Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Removed if __name__ and main() statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mstfbl committed Oct 22, 2019
1 parent dd6c75c commit ba2742f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
12 changes: 1 addition & 11 deletions src/python/tools/ChangeHttpURLsToHttps.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,4 @@ def changeUrls(pathToReportCsv, pathToRootDirectory):
f.close()
print("Altered {} in file: {}".format(row[0], absolutePath))
line_count += 1
print(f'Processed {line_count} URLs.')

def main():
if len(sys.argv) < 3:
print("Usage: python3 changeHttpURLsToHttps.py [PATH_TO_Report_FindHttpURLs.txt] [PATH_TO_ORIGINAL_NIMBUSML_DIRECTORY]")
exit(1)
changeUrls(sys.argv[1], sys.argv[2])


if __name__ == "__main__":
main()
print(f'Processed {line_count} URLs.')
10 changes: 1 addition & 9 deletions src/python/tools/FindHttpURLs.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,4 @@ def makeReports(alterableUrlsStore, nonAlterableUrlsStore, invalidUrlsStore):
for fileValue in invalidUrlsStore[urlKey]:
writer3.writerow([urlKey, fileValue])
return

def main():
if len(sys.argv) < 2:
print("Usage: python3 findHttpURLs.py [PATH_TO_NimbusML_REPOSITORY]")
exit(1)
findHttpUrls(sys.argv[1])

if __name__ == "__main__":
main()

0 comments on commit ba2742f

Please sign in to comment.