allow unquoted message by eating and joining the rest of the command line

This commit is contained in:
josh committed 2012-03-14 12:02:55 -04:00
1 parent 3ae494ea4d
commit dd8b49adad
1 file changed
+2 -2
+2 -2
View File
@@ -15,11 +15,11 @@ def get_config(fname):
def main(argv): def main(argv):
config = {} config = {}
if len(argv) != 3: if len(argv) < 3:
sys.stderr.write('Usage: %s <config-file> <note>\n' % argv[0]) sys.stderr.write('Usage: %s <config-file> <note>\n' % argv[0])
return 1 return 1
config = get_config(argv[1]) config = get_config(argv[1])
message = argv[2] message = ' '.join(argv[2:])
if not ('server' in config and 'port' in config and 'user' in config if not ('server' in config and 'port' in config and 'user' in config
and 'password' in config and 'to_addr' in config and 'password' in config and 'to_addr' in config
and 'from_addr' in config): and 'from_addr' in config):