Browse Source

[songbook] `main()` now accepts zero arguments

pull/205/head
Louis 9 years ago
parent
commit
932e39e6a8
  1. 7
      patacrep/songbook/__main__.py

7
patacrep/songbook/__main__.py

@ -127,8 +127,11 @@ def argument_parser(args):
return options return options
def main(args): def main(args=None):
"""Main function:""" """Main function:"""
if args is None:
args = sys.argv
# set script locale to match user's # set script locale to match user's
try: try:
locale.setlocale(locale.LC_ALL, '') locale.setlocale(locale.LC_ALL, '')
@ -166,4 +169,4 @@ def main(args):
sys.exit(0) sys.exit(0)
if __name__ == '__main__': if __name__ == '__main__':
main(sys.argv) main()

Loading…
Cancel
Save