summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-05-06 17:19:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-07 13:40:36 +0100
commit9e9d25dc96427f67d1572f0957f8b14032411845 (patch)
treeb45869fb2de7ca1473ea2a2f48fc0843345c0359
parentc045129ce9089965e4c47051b2b61faedbd5052d (diff)
downloadpoky-9e9d25dc96427f67d1572f0957f8b14032411845.tar.gz
classes/buildstats: don't catch all errors from mkdirhier
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. (From OE-Core rev: 76daab82185851608e5e225487e411504ecb6569) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildstats.bbclass15
1 files changed, 3 insertions, 12 deletions
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index f15c45dbc7..54d9f72b1d 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -181,20 +181,14 @@ python run_buildstats () {
181 # at first pass make the buildstats heriarchy and then 181 # at first pass make the buildstats heriarchy and then
182 # set the buildname 182 # set the buildname
183 ######################################################################## 183 ########################################################################
184 try: 184 bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
185 bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
186 except:
187 pass
188 set_bn(e) 185 set_bn(e)
189 bn = get_bn(e) 186 bn = get_bn(e)
190 set_device(e) 187 set_device(e)
191 device = get_device(e) 188 device = get_device(e)
192 189
193 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 190 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
194 try: 191 bb.utils.mkdirhier(bsdir)
195 bb.utils.mkdirhier(bsdir)
196 except:
197 pass
198 if device != "NoLogicalDevice": 192 if device != "NoLogicalDevice":
199 set_diskdata("__diskdata_build", device, e.data) 193 set_diskdata("__diskdata_build", device, e.data)
200 set_timedata("__timedata_build", e.data) 194 set_timedata("__timedata_build", e.data)
@@ -242,10 +236,7 @@ python run_buildstats () {
242 if device != "NoLogicalDevice": 236 if device != "NoLogicalDevice":
243 set_diskdata("__diskdata_task", device, e.data) 237 set_diskdata("__diskdata_task", device, e.data)
244 set_timedata("__timedata_task", e.data, e.time) 238 set_timedata("__timedata_task", e.data, e.time)
245 try: 239 bb.utils.mkdirhier(taskdir)
246 bb.utils.mkdirhier(taskdir)
247 except:
248 pass
249 # write into the task event file the name and start time 240 # write into the task event file the name and start time
250 file = open(os.path.join(taskdir, e.task), "a") 241 file = open(os.path.join(taskdir, e.task), "a")
251 file.write("Event: %s \n" % bb.event.getName(e)) 242 file.write("Event: %s \n" % bb.event.getName(e))