From 704e8bdc006861449fce67d85511a5763ac3d71c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 18 Sep 2016 15:54:33 +0200 Subject: fixed commandline parser of runner 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') -- cgit v0.10.2