summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2006-08-17 14:40:54 +0000
committerHolger Freyther <zecke@selfish.org>2006-08-17 14:40:54 +0000
commitbe18b92133b1326202241c23613baaa34ccd2c7a (patch)
tree4247b226015f5738c682de77448b3c3da576625b /classes
parent9331135432b75a22fde6a63e255207ac90226f92 (diff)
classes/tinderclient.bbclass: Fixes. truncate does not work this way...
Fixup truncate to forget the the status of previous runs. We will simply write("") to the file and empty it this way. int(f.read()) will fail then
Diffstat (limited to 'classes')
-rw-r--r--classes/tinderclient.bbclass12
1 files changed, 7 insertions, 5 deletions
diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass
index 58b4e540d0..0cfa9c7ea0 100644
--- a/classes/tinderclient.bbclass
+++ b/classes/tinderclient.bbclass
@@ -279,14 +279,17 @@ def tinder_do_tinder_report(event):
try:
# truncate the tinder log file
- f = file(data.getVar('TINDER_LOG', event.data, True), 'rw+')
- f.truncate(0)
+ f = file(data.getVar('TINDER_LOG', event.data, True), 'w')
+ f.write("")
f.close()
+ except:
+ pass
+ try:
# write a status to the file. This is needed for the -k option
# of BitBake
- g = file(data.getVar('TMPDIR', event.data, True)+"/tinder-status", 'rw+')
- g.truncate(0)
+ g = file(data.getVar('TMPDIR', event.data, True)+"/tinder-status", 'w')
+ g.write("")
g.close()
except IOError:
pass
@@ -325,7 +328,6 @@ def tinder_do_tinder_report(event):
try:
h = file(data.getVar('TMPDIR',event.data,True)+'/tinder-status', 'r')
status = int(h.read())
- print "New status %d" % status
except:
pass