summaryrefslogtreecommitdiffstats
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-10-01 21:45:55 +0100
commit58bd0fd62d1617f60e6b42e11f19e14289b6ee24 (patch)
tree71212f4455e0296efc84c0792cb639444e9e1922 /scripts/buildstats-diff
parentd8879975b5138ab55fd42b38cd70d9a4c819dd1b (diff)
downloadpoky-58bd0fd62d1617f60e6b42e11f19e14289b6ee24.tar.gz
scripts/buildstats-diff: check that the given directory exists
(From OE-Core rev: 08082b96d8d09215f02e9251f354bb6e8bb3e712) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
115 115
116 if os.path.isfile(os.path.join(bs_dir, 'build_stats')): 116 if os.path.isfile(os.path.join(bs_dir, 'build_stats')):
117 top_dir = bs_dir 117 top_dir = bs_dir
118 else: 118 elif os.path.exists(bs_dir):
119 subdirs = sorted(glob.glob(bs_dir + '/*')) 119 subdirs = sorted(glob.glob(bs_dir + '/*'))
120 if len(subdirs) > 1: 120 if len(subdirs) > 1:
121 log.warning("Multiple buildstats found, using the first one") 121 log.warning("Multiple buildstats found, using the first one")
122 top_dir = subdirs[0] 122 top_dir = subdirs[0]
123 else:
124 log.error("No such directory: %s", bs_dir)
125 sys.exit(1)
123 log.debug("Reading buildstats directory %s", top_dir) 126 log.debug("Reading buildstats directory %s", top_dir)
124 subdirs = os.listdir(top_dir) 127 subdirs = os.listdir(top_dir)
125 128