#MONITOR_USER_ID = 11142
import logging
-verbose = 1
+verbose = 0
#dryrun = 0;
class ExceptionNoTransport(Exception): pass
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")
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
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
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
"""
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: