summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlorry-controller-minion1
-rwxr-xr-xlorry-controller-remove-old-jobs2
-rw-r--r--lorrycontroller/readconf.py7
-rw-r--r--lorrycontroller/stopjob.py2
4 files changed, 3 insertions, 9 deletions
diff --git a/lorry-controller-minion b/lorry-controller-minion
index 1900313..2cde979 100755
--- a/lorry-controller-minion
+++ b/lorry-controller-minion
@@ -111,7 +111,6 @@ class MINION(cliapp.Application):
def get_job_spec(self):
host = self.settings['webapp-host']
port = int(self.settings['webapp-port'])
- timeout = self.settings['webapp-timeout']
logging.debug('Requesting job from WEBAPP (%s:%s)', host, port)
diff --git a/lorry-controller-remove-old-jobs b/lorry-controller-remove-old-jobs
index fcd8b38..78b5596 100755
--- a/lorry-controller-remove-old-jobs
+++ b/lorry-controller-remove-old-jobs
@@ -144,7 +144,7 @@ class OldJobRemover(cliapp.Application):
def post(self, path, data):
url = self.make_url(path)
with urllib.request.urlopen(url, data.encode('utf-8')) as f:
- result = f.read()
+ f.read()
OldJobRemover().run()
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py
index 512b558..b488765 100644
--- a/lorrycontroller/readconf.py
+++ b/lorrycontroller/readconf.py
@@ -209,11 +209,6 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
timeout = section.get(
'lorry-timeout', self.DEFAULT_LORRY_TIMEOUT)
- try:
- old_lorry_info = statedb.get_lorry_info(path)
- except lorrycontroller.LorryNotFoundError:
- old_lorry_info = None
-
statedb.add_to_lorries(
path=path, text=text, from_host='', from_path='',
interval=interval, timeout=timeout)
@@ -244,7 +239,7 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
except yaml.YAMLError:
f.seek(0)
obj = json.load(f)
- except ValueError as e:
+ except ValueError:
logging.error('YAML and JSON problem in %s', filename)
return []
diff --git a/lorrycontroller/stopjob.py b/lorrycontroller/stopjob.py
index f2ead87..6472edb 100644
--- a/lorrycontroller/stopjob.py
+++ b/lorrycontroller/stopjob.py
@@ -32,7 +32,7 @@ class StopJob(lorrycontroller.LorryControllerRoute):
statedb = self.open_statedb()
with statedb:
try:
- path = statedb.find_lorry_running_job(job_id)
+ statedb.find_lorry_running_job(job_id)
except lorrycontroller.WrongNumberLorriesRunningJob:
logging.warning(
"Tried to kill job %s which isn't running" % job_id)