[oe-commits] [openembedded-core] 10/30: scripts/buildstats-diff: check that the given directory exists
git at git.openembedded.org
git at git.openembedded.org
Fri Sep 30 16:16:15 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 08082b96d8d09215f02e9251f354bb6e8bb3e712
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Thu Sep 29 17:27:58 2016 +0300
scripts/buildstats-diff: check that the given directory exists
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/buildstats-diff | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index 8ee2aaf..d0cd766 100755
--- a/scripts/buildstats-diff
+++ b/scripts/buildstats-diff
@@ -115,11 +115,14 @@ def read_buildstats_dir(bs_dir):
if os.path.isfile(os.path.join(bs_dir, 'build_stats')):
top_dir = bs_dir
- else:
+ elif os.path.exists(bs_dir):
subdirs = sorted(glob.glob(bs_dir + '/*'))
if len(subdirs) > 1:
log.warning("Multiple buildstats found, using the first one")
top_dir = subdirs[0]
+ else:
+ log.error("No such directory: %s", bs_dir)
+ sys.exit(1)
log.debug("Reading buildstats directory %s", top_dir)
subdirs = os.listdir(top_dir)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list