practracker: pass sys.argv to main() as an argument

This commit is contained in:
Nick Mathewson 2019-03-25 15:52:43 -04:00
parent 301e3f22ef
commit 0260e0f6fc

View File

@ -145,8 +145,8 @@ HEADER="""\
""".format(**globals())
def main():
if (len(sys.argv) != 2):
def main(argv):
if (len(argv) != 2):
print("Usage:\n\t$ practracker.py <tor topdir>\n\t(e.g. $ practracker.py ~/tor/)")
return
@ -180,4 +180,4 @@ See doc/HACKING/HelpfulTools.md for more information on using practracker.\
sys.exit(found_new_issues)
if __name__ == '__main__':
main()
main(sys.argv)