summaryrefslogtreecommitdiffstats
path: root/reduce.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-07-25 11:10:36 +0800
committerPeng Wu <alexepico@gmail.com>2011-07-25 11:10:36 +0800
commit114342747eaf4e5719745c0cd113272e3c4c51ba (patch)
treed8a4415bf5e2d34fd44d751cf0ad5cde218b87cd /reduce.py
parentb3b768cc6806d51b9693348c759b40fc46deabc3 (diff)
downloadtrainer-114342747eaf4e5719745c0cd113272e3c4c51ba.zip
trainer-114342747eaf4e5719745c0cd113272e3c4c51ba.tar.gz
trainer-114342747eaf4e5719745c0cd113272e3c4c51ba.tar.xz
refine arguments
Diffstat (limited to 'reduce.py')
-rwxr-xr-xreduce.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/reduce.py b/reduce.py
index 2751124..6c12519 100755
--- a/reduce.py
+++ b/reduce.py
@@ -48,7 +48,7 @@ def iterateSubDirectory(oldroot, newroot, level):
if __name__ == '__main__':
parser = ArgumentParser(description='Reduce the levels of categories.')
parser.add_argument('--level', action='store', default=2, \
- help='reduce to n levels of index')
+ help='reduce to n levels of index', type=int)
parser.add_argument('origdir', action='store', \
help='original index directory')
parser.add_argument('--destdir', action='store', \
@@ -57,5 +57,5 @@ if __name__ == '__main__':
args = parser.parse_args()
print(args)
- iterateSubDirectory(args.origdir, args.destdir, int(args.level))
+ iterateSubDirectory(args.origdir, args.destdir, args.level)
print('done')