1. Arnaud Grausem
  2. adama


Arnaud Grausem  committed 75acb97

Argv parameter must be set to None to choose sys argv

  • Participants
  • Parent commits b8d26f2
  • Branches default

Comments (0)

Files changed (1)

File src/adama/__init__.py

View file
     """Launches the right order or displaying the help for a command or an order
     directly from command line.
-    argv = argv if argv else sys.argv[:]
+    argv = argv if argv is not None else sys.argv[:]
     command = os.path.basename(argv[0])
     module = module if module else command
     commander = Commander(module, doc=doc, command=command)
         order_name = argv[1] if not order_help else argv[2]
             order = commander[order_name]
-        except UnknownOrderError as e:
-            return e()
+        except UnknownOrderError as uoe:
+            return uoe()
             if order_help:
                 return order.explanations()
                 return order(argv[2:])
 def call_order(module_name, order_name, *args, **kwargs):
     """Calls an order from another python script directly