[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
finally:
cr.close()
self.lock.acquire()
self.updating = False
self.last_update = time.time()
self.lock.release()
with self.lock:
self.updating = False
self.last_update = time.time()
def start_printer_update(self, cr, uid, context):