git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
just commit everything...
[monitor.git]
/
moncommands.py
diff --git
a/moncommands.py
b/moncommands.py
index
65684c5
..
1b67570
100644
(file)
--- a/
moncommands.py
+++ b/
moncommands.py
@@
-2,6
+2,7
@@
import os
DEBUG= 0
DEBUG= 0
+class ExceptionTimeout(Exception): pass
COMMAND_TIMEOUT = 60
ssh_options = { 'StrictHostKeyChecking':'no',
'BatchMode':'yes',
COMMAND_TIMEOUT = 60
ssh_options = { 'StrictHostKeyChecking':'no',
'BatchMode':'yes',
@@
-65,16
+66,14
@@
class CMD:
o_value = ""
e_value = ""
o_value = ""
e_value = ""
- #print "reading from f_out"
- if len(lout) > 0: o_value = f_out.read()
- #print "reading from f_err"
- if len(lerr) > 0: e_value = f_err.read()
+ o_value = f_out.read()
+ e_value = f_err.read()
#print "striping output"
o_value = o_value.strip()
e_value = e_value.strip()
#print "striping output"
o_value = o_value.strip()
e_value = e_value.strip()
- #print "OUTPUT
", o_value, e_value
+ #print "OUTPUT
-%s-%s-" % (o_value, e_value)
#print "closing files"
f_out.close()
#print "closing files"
f_out.close()