summaryrefslogtreecommitdiff
path: root/scripts/buildstats-diff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-29 17:27:58 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-30 17:14:11 +0100
commit08082b96d8d09215f02e9251f354bb6e8bb3e712 (patch)
tree97ade72c42207d92187663127ed246579fc39a33 /scripts/buildstats-diff
parent9b8d7f9fc10c862b78ebc669a7b47e9cb1142d87 (diff)
downloadopenembedded-core-08082b96d8d09215f02e9251f354bb6e8bb3e712.tar.gz
openembedded-core-08082b96d8d09215f02e9251f354bb6e8bb3e712.tar.bz2
openembedded-core-08082b96d8d09215f02e9251f354bb6e8bb3e712.zip
scripts/buildstats-diff: check that the given directory exists
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/buildstats-diff')
-rwxr-xr-xscripts/buildstats-diff5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/buildstats-diff b/scripts/buildstats-diff
index 8ee2aaf626..d0cd7669a3 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)