dry_run might be undefined in options
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 21 May 2012 14:46:02 +0000 (16:46 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 21 May 2012 14:46:02 +0000 (16:46 +0200)
system/utils.py

index d6938bf..cc03318 100644 (file)
@@ -23,7 +23,7 @@ def pprint(message,spec,depth=2):
 
 
 def system(command,background=False,silent=False):
-    if options.dry_run:
+    if getattr(options,'dry_run',None):
         print 'dry_run:',command
         return 0