git://git.onelab.eu
/
pcucontrol.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0dcdc23
)
remove unnecessary 'print's
author
Stephen Soltesz
<soltesz@cs.princeton.edu>
Sat, 24 Dec 2011 22:09:45 +0000
(22:09 +0000)
committer
Stephen Soltesz
<soltesz@cs.princeton.edu>
Sat, 24 Dec 2011 22:09:45 +0000
(22:09 +0000)
pcucontrol/reboot.py
patch
|
blob
|
history
pcucontrol/transports/pyssh/__init__.py
patch
|
blob
|
history
pcucontrol/transports/pyssh/nbpipe.py
patch
|
blob
|
history
pcucontrol/transports/telnetlib.py
patch
|
blob
|
history
diff --git
a/pcucontrol/reboot.py
b/pcucontrol/reboot.py
index
f273348
..
90fe6c7
100755
(executable)
--- a/
pcucontrol/reboot.py
+++ b/
pcucontrol/reboot.py
@@
-33,7
+33,7
@@
import pcucontrol.transports.pyssh as pyssh
#MONITOR_USER_ID = 11142
import logging
#MONITOR_USER_ID = 11142
import logging
-verbose =
1
+verbose =
0
#dryrun = 0;
class ExceptionNoTransport(Exception): pass
#dryrun = 0;
class ExceptionNoTransport(Exception): pass
@@
-255,7
+255,7
@@
class Transport:
if self.transport != None:
output = self.transport.read_until(expected, self.TELNET_TIMEOUT)
if output.find(expected) == -1:
if self.transport != None:
output = self.transport.read_until(expected, self.TELNET_TIMEOUT)
if output.find(expected) == -1:
- print "OUTPUT: --%s--" % output
+
#
print "OUTPUT: --%s--" % output
raise ErrorClass, "'%s' not found: Got: %s" % (expected, output)
else:
self.transport.write(buffer + "\r\n")
raise ErrorClass, "'%s' not found: Got: %s" % (expected, output)
else:
self.transport.write(buffer + "\r\n")
diff --git
a/pcucontrol/transports/pyssh/__init__.py
b/pcucontrol/transports/pyssh/__init__.py
index
0c5cf4f
..
b64b9db
100644
(file)
--- a/
pcucontrol/transports/pyssh/__init__.py
+++ b/
pcucontrol/transports/pyssh/__init__.py
@@
-15,7
+15,7
@@
version 0.1 of pyssh (http://pyssh.sourceforge.net) by Chuck Esterbrook.
Licenced under a Python 2.2 style license. See License.txt.
\r
"""
\r
\r
Licenced under a Python 2.2 style license. See License.txt.
\r
"""
\r
\r
-DEBUG_LEVEL =
1
\r
+DEBUG_LEVEL =
0
\r
\r
import os, getpass
\r
import signal # should cause all KeyboardInterrupts to go to the main thread
\r
\r
import os, getpass
\r
import signal # should cause all KeyboardInterrupts to go to the main thread
\r
@@
-162,8
+162,8
@@
class Ssh:
sshargs += self.host
\r
if cmd:
\r
sshargs += ' ' + cmd
\r
sshargs += self.host
\r
if cmd:
\r
sshargs += ' ' + cmd
\r
- if self.debuglevel:
\r
- print ">> Running %s %s." % (self.sshpath, sshargs)
\r
+
#
if self.debuglevel:
\r
+
#
print ">> Running %s %s." % (self.sshpath, sshargs)
\r
# temporary workaround until I get pid's working under win32
\r
#print sshargs
\r
if os.name == 'posix':
\r
# temporary workaround until I get pid's working under win32
\r
#print sshargs
\r
if os.name == 'posix':
\r
diff --git
a/pcucontrol/transports/pyssh/nbpipe.py
b/pcucontrol/transports/pyssh/nbpipe.py
index
08b4f97
..
8683779
100644
(file)
--- a/
pcucontrol/transports/pyssh/nbpipe.py
+++ b/
pcucontrol/transports/pyssh/nbpipe.py
@@
-46,7
+46,7
@@
class nbpipe:
item = os.read(self.fd, self.blocksize)
\r
except (IOError, OSError):
\r
finish = 1
\r
item = os.read(self.fd, self.blocksize)
\r
except (IOError, OSError):
\r
finish = 1
\r
- if
(item == '') or finish
:
\r
+ if
finish or (item == '')
:
\r
# Wait until everything has been read from the queue before
\r
# setting eof = 1 and exiting.
\r
while not self._q.empty():
\r
# Wait until everything has been read from the queue before
\r
# setting eof = 1 and exiting.
\r
while not self._q.empty():
\r
diff --git
a/pcucontrol/transports/telnetlib.py
b/pcucontrol/transports/telnetlib.py
index
cfa96c9
..
0564518
100644
(file)
--- a/
pcucontrol/transports/telnetlib.py
+++ b/
pcucontrol/transports/telnetlib.py
@@
-252,7
+252,7
@@
class Telnet:
"""
if self.debuglevel > 0:
"""
if self.debuglevel > 0:
- print 'Telnet(%s,%d):' % (self.host, self.port),
+
#
print 'Telnet(%s,%d):' % (self.host, self.port),
if args:
print msg % args
else:
if args:
print msg % args
else: