aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 1649e406e9..bb9fb9b049 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -604,13 +604,14 @@ def create_recipe(args):
sys.exit(1)
# Move any extra files the plugins created to a directory next to the recipe
- if outfile == '-':
- extraoutdir = pn
- else:
- extraoutdir = os.path.join(os.path.dirname(outfile), pn)
- bb.utils.mkdirhier(extraoutdir)
- for destfn, extrafile in extrafiles.iteritems():
- shutil.move(extrafile, os.path.join(extraoutdir, destfn))
+ if extrafiles:
+ if outfile == '-':
+ extraoutdir = pn
+ else:
+ extraoutdir = os.path.join(os.path.dirname(outfile), pn)
+ bb.utils.mkdirhier(extraoutdir)
+ for destfn, extrafile in extrafiles.iteritems():
+ shutil.move(extrafile, os.path.join(extraoutdir, destfn))
lines = lines_before
lines_before = []