Fix copy_archives crash when pattern is None 85/13285/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 1 Nov 2018 21:53:47 +0000 (17:53 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 1 Nov 2018 21:56:17 +0000 (17:56 -0400)
We should just exist out of the function if no pattern is passed.

Change-Id: I7299b2606713685720ff0cf76b5fddb77296a954
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
lftools/deploy.py

index 453cb95..d19133d 100644 (file)
@@ -42,6 +42,9 @@ def copy_archives(workspace, pattern=None):
         except shutil.Error as e:
             log.warn(e)
 
+    if pattern is None:
+        return
+
     paths = []
     for p in pattern:
         search = os.path.join(workspace, p)