diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 0b151c214d..116abc428b 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -177,9 +177,8 @@ def package_qa_write_error(type, error, d): | |||
177 | logfile = d.getVar('QA_LOGFILE', True) | 177 | logfile = d.getVar('QA_LOGFILE', True) |
178 | if logfile: | 178 | if logfile: |
179 | p = d.getVar('P', True) | 179 | p = d.getVar('P', True) |
180 | f = file( logfile, "a+") | 180 | with open(logfile, "a+") as f: |
181 | print >> f, "%s: %s [%s]" % (p, error, type) | 181 | f.write("%s: %s [%s]" % (p, error, type)) |
182 | f.close() | ||
183 | 182 | ||
184 | def package_qa_handle_error(error_class, error_msg, d): | 183 | def package_qa_handle_error(error_class, error_msg, d): |
185 | package_qa_write_error(error_class, error_msg, d) | 184 | package_qa_write_error(error_class, error_msg, d) |