[FIX] We better have to use the "with" syntax

This commit is contained in:
Lorenzo Battistini
2012-12-06 15:46:53 +01:00
parent 5ac57dfd79
commit 5249f293fd

View File

@@ -118,10 +118,9 @@ class printing_printer(osv.osv):
raise raise
finally: finally:
cr.close() cr.close()
self.lock.acquire() with self.lock:
self.updating = False self.updating = False
self.last_update = time.time() self.last_update = time.time()
self.lock.release()
def start_printer_update(self, cr, uid, context): def start_printer_update(self, cr, uid, context):