Commit 5f002be2 authored by Michael Wimmer's avatar Michael Wimmer
Browse files

bug fixing

parent d7b5c6ee
......@@ -273,8 +273,10 @@ class ClusterDaemon:
self.soc.send_pyobj({'error': 'unknown query'},
zmq.NOBLOCK)
except Exception:
self.soc.send_pyobj({'error': 'input error'},
except Exception as e:
self.soc.send_pyobj({'error': 'input error ' +
+ '(python error: ' +
+ str(e) + ')'},
zmq.NOBLOCK)
continue
except KeyboardInterrupt:
......@@ -353,7 +355,7 @@ class ClusterDaemon:
self.register(pids, procs_per_job,
mem_per_job, reservation=res_num)
self.soc.send_pyobj({'success' : success},
self.soc.send_pyobj({'success' : True},
zmq.NOBLOCK)
......
......@@ -94,8 +94,10 @@ class Machine(object):
pollrslt = Machine.Query.poll(self)
if pollrslt and self.success :
self.success = self.result['success']
if pollrslt and self.success:
if 'error' in self.result:
self.error = self.result['error']
self.success = False
return pollrslt
......@@ -433,7 +435,7 @@ def schedule(mach_names, commands, n_passes=1, redirect=True,
# check if processes were registered properly (shouldn't fail typically)
to_be_removed = []
for i, register in enumerate(registeringing):
for i, register in enumerate(registering):
if register.poll():
done_something = True
to_be_removed.append(i)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment