Removed if __name__ and main() statements

This commit is contained in:
Mustafa Bal 2019-10-22 14:39:19 -07:00
Родитель dd6c75c37a
Коммит ba2742fa81
2 изменённых файлов: 2 добавлений и 20 удалений

Просмотреть файл

@ -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.')

Просмотреть файл

@ -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()