From: Stephen Soltesz <soltesz@cs.princeton.edu>
Date: Mon, 7 Dec 2009 20:59:46 +0000 (+0000)
Subject: added supported_ports to class definition
X-Git-Tag: Monitor-3.0-26~8
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=55ad91bb24aa69683676678f819869abdae380f4;p=monitor.git

added supported_ports to class definition
removed references to self.transport.verbose since here is no self.transport
---

diff --git a/pcucontrol/models/ePowerSwitch.py b/pcucontrol/models/ePowerSwitch.py
index edff5cc..75e552a 100644
--- a/pcucontrol/models/ePowerSwitch.py
+++ b/pcucontrol/models/ePowerSwitch.py
@@ -1,6 +1,7 @@
 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
@@ -50,14 +51,15 @@ class ePowerSwitchNew(PCUControl):
 				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:
-			if self.transport.verbose: print f.read()
+			#if self.transport.verbose: print f.read()
+			pass
 
 		return 0