mirror of
https://github.com/moparisthebest/sendxmpp-py
synced 2024-12-21 23:08:54 -05:00
fix optional command line arguments handling (fixes #1)
This commit is contained in:
parent
b4a5a71cc0
commit
243173b160
@ -59,8 +59,8 @@ if __name__ == '__main__':
|
||||
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument('recipients', metavar='<file or JID>', nargs='+', type=file_or_jid, help='file format is one JID per line')
|
||||
p.add_argument('-c', '--config', nargs=1, default=os.path.expanduser('~/.sendxmpp'), type=argparse.FileType('r'))
|
||||
p.add_argument('-s', '--subject', nargs=1, default='')
|
||||
p.add_argument('-c', '--config', nargs='?', default=os.path.expanduser('~/.sendxmpp'), type=argparse.FileType('r'))
|
||||
p.add_argument('-s', '--subject', nargs='?', default='')
|
||||
try:
|
||||
global_args = p.parse_args()
|
||||
except argparse.ArgumentError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user