diff options
-rw-r--r-- | scripts/lib/devtool/standard.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 2dbe37263c..ff79c05e39 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -334,9 +334,11 @@ def _extract_source(srctree, keep_temp, devbranch, d): | |||
334 | else: | 334 | else: |
335 | os.rmdir(patchdir) | 335 | os.rmdir(patchdir) |
336 | 336 | ||
337 | if not os.listdir(srcsubdir): | 337 | if not os.path.exists(srcsubdir) or not os.listdir(srcsubdir): |
338 | raise DevtoolError("no source unpacked to S, perhaps the %s " | 338 | raise DevtoolError("no source unpacked to S, either the %s " |
339 | "recipe doesn't use any source?" % pn) | 339 | "recipe doesn't use any source or the " |
340 | "correct source directory could not be " | ||
341 | "determined" % pn) | ||
340 | 342 | ||
341 | if not os.path.exists(os.path.join(srcsubdir, '.git')): | 343 | if not os.path.exists(os.path.join(srcsubdir, '.git')): |
342 | bb.process.run('git init', cwd=srcsubdir) | 344 | bb.process.run('git init', cwd=srcsubdir) |