summaryrefslogtreecommitdiff
path: root/lorrycontroller/jobupdate.py
diff options
context:
space:
mode:
Diffstat (limited to 'lorrycontroller/jobupdate.py')
-rw-r--r--lorrycontroller/jobupdate.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lorrycontroller/jobupdate.py b/lorrycontroller/jobupdate.py
index b6ee1fe..24a3c4a 100644
--- a/lorrycontroller/jobupdate.py
+++ b/lorrycontroller/jobupdate.py
@@ -38,8 +38,7 @@ class JobUpdate(lorrycontroller.LorryControllerRoute):
logging.info('Job %s updated (exit=%s)', job_id, exit)
- statedb = self.open_statedb()
- with statedb:
+ with self.open_statedb() as statedb:
if stdout:
statedb.append_to_job_output(job_id, stdout)
if stderr: