aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
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
parentd8879975b5138ab55fd42b38cd70d9a4c819dd1b (diff)
downloadopenembedded-core-contrib-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')
-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)
92'>192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308