diff cmd2.py @ 296:ae476b714190

tolerate single option in non-list form
author catherine@bothari
date Sun, 24 Jan 2010 07:42:41 -0500
parents f5593299fc2a
children ab340dfd2e14
line wrap: on
line diff
--- a/cmd2.py	Sun Jan 24 06:59:36 2010 -0500
+++ b/cmd2.py	Sun Jan 24 07:42:41 2010 -0500
@@ -102,6 +102,8 @@
            if opts.quick:
                self.fast_button = True
        '''
+    if not isinstance(option_list, list):
+        option_list = [option_list]
     def option_setup(func):
         optionParser = OptionParser()
         for opt in option_list: