Fix command line argument passing to main. (#39)

This commit is contained in:
Jon Grace-Cox
2020-03-15 13:12:41 -04:00
committed by GitHub
parent aeedfbb93d
commit d38230ce3a

View File

@@ -790,6 +790,11 @@ examples:
def main(args): def main(args):
"""Generate a badge based on command line arguments.""" """Generate a badge based on command line arguments."""
# Args may be sent from command line of as args directly.
if not args:
args = sys.argv[1:]
# Parse command line arguments # Parse command line arguments
args = parse_args(args) args = parse_args(args)
@@ -830,4 +835,4 @@ def main(args):
if __name__ == '__main__': if __name__ == '__main__':
main(sys.argv[1:]) main()