remove unnecessary 'print's
authorStephen Soltesz <soltesz@cs.princeton.edu>
Sat, 24 Dec 2011 22:09:45 +0000 (22:09 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Sat, 24 Dec 2011 22:09:45 +0000 (22:09 +0000)
pcucontrol/reboot.py
pcucontrol/transports/pyssh/__init__.py
pcucontrol/transports/pyssh/nbpipe.py
pcucontrol/transports/telnetlib.py

index f273348..90fe6c7 100755 (executable)
@@ -33,7 +33,7 @@ import pcucontrol.transports.pyssh as pyssh
 #MONITOR_USER_ID = 11142
 
 import logging
-verbose = 1
+verbose = 0
 #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:
-                print "OUTPUT: --%s--" % output
+                #print "OUTPUT: --%s--" % output
                 raise ErrorClass, "'%s' not found: Got: %s" % (expected, output)
             else:
                 self.transport.write(buffer + "\r\n")
index 0c5cf4f..b64b9db 100644 (file)
@@ -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
-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
@@ -162,8 +162,8 @@ class Ssh:
         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
index 08b4f97..8683779 100644 (file)
@@ -46,7 +46,7 @@ class nbpipe:
                 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
index cfa96c9..0564518 100644 (file)
@@ -252,7 +252,7 @@ class Telnet:
 
         """
         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: