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
added supported_ports to class definition
[monitor.git]
/
pcucontrol
/
models
/
ePowerSwitch.py
diff --git
a/pcucontrol/models/ePowerSwitch.py
b/pcucontrol/models/ePowerSwitch.py
index
edff5cc
..
75e552a
100644
(file)
--- a/
pcucontrol/models/ePowerSwitch.py
+++ b/
pcucontrol/models/ePowerSwitch.py
@@
-1,6
+1,7
@@
from pcucontrol.reboot import *
class ePowerSwitchNew(PCUControl):
from pcucontrol.reboot import *
class ePowerSwitchNew(PCUControl):
+ supported_ports = [80]
# NOTE:
# The old code used Python's HTTPPasswordMgrWithDefaultRealm()
# For some reason this both doesn't work and in some cases, actually
# NOTE:
# The old code used Python's HTTPPasswordMgrWithDefaultRealm()
# For some reason this both doesn't work and in some cases, actually
@@
-50,14
+51,15
@@
class ePowerSwitchNew(PCUControl):
req.add_header("Authorization", authheader)
# add data to handler,
f = urllib2.urlopen(req, data)
req.add_header("Authorization", authheader)
# add data to handler,
f = urllib2.urlopen(req, data)
- if self.transport.verbose: print f.read()
+
#
if self.transport.verbose: print f.read()
except:
import traceback; traceback.print_exc()
# fetch url one more time on cmd.html, econtrol.html or whatever.
# pass
else:
except:
import traceback; traceback.print_exc()
# fetch url one more time on cmd.html, econtrol.html or whatever.
# pass
else:
- if self.transport.verbose: print f.read()
+ #if self.transport.verbose: print f.read()
+ pass
return 0
return 0