]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
package bug fix
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Tue, 10 Jan 2017 09:46:37 +0000 (10:46 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Tue, 10 Jan 2017 09:46:37 +0000 (10:46 +0100)
commands/package.py

index 35a6fc148330b1f3014e8b2eafaebbcc7633c0b6..69c079c97cae108fa4d74dfc25c795305c287a19 100644 (file)
@@ -963,12 +963,13 @@ def run(args, runner, logger):
     d_files_to_add["README"] = (local_readme_tmp_path, "README")
 
     # Add the additional files of option add_files
-    for file_path in options.add_files:
-        if not os.path.exists(file_path):
-            msg = _("WARNING: the file %s is not accessible.\n" % file_path)
-            continue
-        file_name = os.path.basename(file_path)
-        d_files_to_add[file_name] = (file_path, file_name)
+    if options.add_files:
+        for file_path in options.add_files:
+            if not os.path.exists(file_path):
+                msg = _("WARNING: the file %s is not accessible.\n" % file_path)
+                continue
+            file_name = os.path.basename(file_path)
+            d_files_to_add[file_name] = (file_path, file_name)
 
     logger.write("\n", 2)