From: Thanh Ha Date: Thu, 1 Nov 2018 21:53:47 +0000 (-0400) Subject: Fix copy_archives crash when pattern is None X-Git-Tag: v0.19.0~23^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F13285%2F1;p=releng%2Flftools.git Fix copy_archives crash when pattern is None We should just exist out of the function if no pattern is passed. Change-Id: I7299b2606713685720ff0cf76b5fddb77296a954 Signed-off-by: Thanh Ha --- diff --git a/lftools/deploy.py b/lftools/deploy.py index 453cb952..d19133d8 100644 --- a/lftools/deploy.py +++ b/lftools/deploy.py @@ -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)