diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-12-02 21:20:05 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-12-02 21:22:25 +0100 |
commit | 910ca89d6b75739c154edbe47ac16efb82a7285e (patch) | |
tree | 79f34270c541b9b3d171974e4ed439c0eccbee56 | |
parent | b88c7acdf87743ac7ec8c5e86156dbde030cb860 (diff) | |
download | pidu-910ca89d6b75739c154edbe47ac16efb82a7285e.tar.gz pidu-910ca89d6b75739c154edbe47ac16efb82a7285e.tar.bz2 pidu-910ca89d6b75739c154edbe47ac16efb82a7285e.zip |
arg parse : default values need to be in arrays
-rwxr-xr-x | pidu | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -74,7 +74,7 @@ def check_positive(value): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument('-j', '--jobs', nargs=1, type=check_positive, default=cpu_count(), help='Use N parallel process to stat() the filesystem' ) - parser.add_argument('path', nargs='*', default=os.getcwd()) + parser.add_argument('-j', '--jobs', nargs=1, type=check_positive, default=[cpu_count()], help='Use N parallel process to stat() the filesystem' ) + parser.add_argument('path', nargs='*', default=[os.getcwd()]) args = parser.parse_args() main(args) |