diff options
-rw-r--r-- | lib/bb/cooker.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 6833ec21f..83644b9d5 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -691,7 +691,11 @@ class BBCooker: if dirfiles: newfiles += dirfiles continue - newfiles += glob.glob(f) or [ f ] + else: + globbed = glob.glob(f) + if not globbed and os.path.exists(f): + globbed = [f] + newfiles += globbed bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1) @@ -704,9 +708,8 @@ class BBCooker: bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.") finalfiles = [] - for i in xrange( len( newfiles ) ): - f = newfiles[i] - if bbmask and bbmask_compiled.search(f): + for f in newfiles: + if bbmask_compiled.search(f): bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f) masked += 1 continue |