| Date: Thu, 17 Mar 2016 14:07:21 -0700
fix parsing of args without option
Diffstat:
M postprocessing.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- |
| t@@ -58,6 +58,8 @@ def iterate_over_folders(folders, plot_sliders):
if plot_sliders:
vis.plot_all_sliders()
+ else:
+ print('No actions specified. Bye.')
def main(argv):
t@@ -67,8 +69,9 @@ def main(argv):
opts, args = getopt.getopt(argv, 'hvs',
['help', 'version', 'plot-sliders'])
except getopt.GetoptError:
- print_usage()
- sys.exit(2)
+ # print_usage()
+ # sys.exit(2)
+ pass
for opt, arg in opts:
if opt in ('-h', '--help'):
t@@ -82,8 +85,8 @@ def main(argv):
elif opt in ('-s', '--plot-sliders'):
plot_sliders = True
- else:
- folders.append(arg)
+ for arg in args:
+ folders.append(arg)
iterate_over_folders(folders, plot_sliders)
|