diff options
author | Christian Pointner <equinox@spreadspace.org> | 2016-09-18 13:54:33 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2016-09-18 13:54:33 (GMT) |
commit | 704e8bdc006861449fce67d85511a5763ac3d71c (patch) | |
tree | d1c1b561638b0af63b84f889b86af33a9ef2a77f | |
parent | 153d8adb66586a2df1dd857db4a50c4314d9ec80 (diff) |
fixed commandline parser of runner
-rwxr-xr-x | run-import.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/run-import.py b/run-import.py index e40390a..1dc1c15 100755 --- a/run-import.py +++ b/run-import.py @@ -91,25 +91,25 @@ if __name__ == '__main__': import sys from multiprocessing import Pool - usage = '''spreadspace simple pic downloader. + usage = '''Radio Helsinki pool-import runner. Usage: run_import.py [pool-size] Options: -h, --help this help message. - -p=N, --pool-size=N the number of paralell imports. + --pool-size N the number of paralell imports. ''' pool_size = 2 try: - opts, args = getopt.getopt(sys.argv[1:], "hp", ["help", "pool-size" ]) + opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "pool-size=" ]) for o, a in opts: if o in ("-h", "--help"): print >> sys.stderr, usage sys.exit(0) - elif o == ("-s", "--pool-size"): - device = a + elif o == "--pool-size": + pool_size = int(a) else: raise getopt.GetoptError('Too many arguments') |