]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/buildstats: don't catch all errors from mkdirhier
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 6 May 2015 16:19:26 +0000 (17:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 May 2015 12:14:38 +0000 (13:14 +0100)
mkdirhier() doesn't raise an exception if the directory exists, so if it
does raise one we should just be failing, otherwise we're just going
to hit errors later anyway.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildstats.bbclass

index f15c45dbc7ca70cde14254be6ec7e5adf336a0b9..54d9f72b1d082b60ed28d45b58580ae47c9cf5d7 100644 (file)
@@ -181,20 +181,14 @@ python run_buildstats () {
         # at first pass make the buildstats heriarchy and then
         # set the buildname
         ########################################################################
-        try:
-            bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
-        except:
-            pass
+        bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
         set_bn(e)
         bn = get_bn(e)
         set_device(e)
         device = get_device(e)
 
         bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
-        try:
-            bb.utils.mkdirhier(bsdir)
-        except:
-            pass
+        bb.utils.mkdirhier(bsdir)
         if device != "NoLogicalDevice":
             set_diskdata("__diskdata_build", device, e.data)
         set_timedata("__timedata_build", e.data)
@@ -242,10 +236,7 @@ python run_buildstats () {
         if device != "NoLogicalDevice":
             set_diskdata("__diskdata_task", device, e.data)
         set_timedata("__timedata_task", e.data, e.time)
-        try:
-            bb.utils.mkdirhier(taskdir)
-        except:
-            pass
+        bb.utils.mkdirhier(taskdir)
         # write into the task event file the name and start time
         file = open(os.path.join(taskdir, e.task), "a")
         file.write("Event: %s \n" % bb.event.getName(e))