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
not sure how these got past. remove monitor module references from pcucontrol.
[monitor.git]
/
pcucontrol
/
reboot.py
diff --git
a/pcucontrol/reboot.py
b/pcucontrol/reboot.py
index
30c7cb5
..
d8fdb27
100755
(executable)
--- a/
pcucontrol/reboot.py
+++ b/
pcucontrol/reboot.py
@@
-57,7
+57,11
@@
class PCU(object):
'pcu_id', 'model',
'node_ids', 'ports', ]:
if field in plc_pcu_dict:
'pcu_id', 'model',
'node_ids', 'ports', ]:
if field in plc_pcu_dict:
- self.__setattr__(field, plc_pcu_dict[field])
+ if type(u"") == type(plc_pcu_dict[field]):
+ # NOTE: if is a unicode string, convert it.
+ self.__setattr__(field, str(plc_pcu_dict[field]))
+ else:
+ self.__setattr__(field, plc_pcu_dict[field])
else:
raise Exception("No such field %s in PCU object" % field)
else:
raise Exception("No such field %s in PCU object" % field)
@@
-327,8
+331,8
@@
class PCUControl(PCUModel,PCURecord):
traceback.print_exc()
return "EOF connection reset" + str(err)
except Exception, err:
traceback.print_exc()
return "EOF connection reset" + str(err)
except Exception, err:
- from monitor.common import email_exception
- email_exception(self.host)
+
#
from monitor.common import email_exception
+
#
email_exception(self.host)
raise Exception(err)
from pcucontrol.util import command
raise Exception(err)
from pcucontrol.util import command