Skip to content

Commit f6b5be8

Browse files
Merge pull request #14 from guacsec/cleanup-scripts
claen up comments in script
2 parents 118e9bd + 4df5114 commit f6b5be8

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

scripts/license_check/license_check.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,10 @@
55
from gql import Client, gql
66
from gql.transport.requests import RequestsHTTPTransport
77

8-
###
9-
#
10-
# Things you might need to change
11-
#
12-
###
13-
148
# Your GUAC GraphQL server
9+
# TODO: Change this to where your graphQL server is running
1510
GRAPHQL_SERVER = "http://localhost:8080/query"
1611

17-
###
18-
#
19-
# Things you probably won't need to change
20-
#
21-
###
22-
2312
def queryGuac():
2413
'''
2514
Search the data in GUAC and return anything with CertifyLegal
@@ -53,12 +42,7 @@ def queryGuac():
5342
return licenseData
5443

5544
def checkLicenses(licenseData):
56-
'''
57-
Comments go here
58-
'''
59-
6045
if sys.argv[1:]:
61-
# Oh, you want me to write to a file? Okay!
6246
outfile = open(sys.argv[1], 'w', newline='')
6347
csvfile = csv.writer(outfile)
6448
csvfile.writerow(['Package', 'Declared', 'Discovered'])
@@ -68,10 +52,8 @@ def checkLicenses(licenseData):
6852
discoveredLicense = licenseData[entry][1]
6953
if declaredLicense != discoveredLicense:
7054
if sys.argv[1:]:
71-
# Write to the file
7255
csvfile.writerow([entry,declaredLicense, discoveredLicense])
7356
else:
74-
# Okay, just print to STDOUT
7557
print(entry)
7658
print("\tDeclares: " + licenseData[entry][0])
7759
print("\tDiscovered: "+ licenseData[entry][1])

0 commit comments

Comments
 (0)