PEP 8 clean thanks to auto pep8

This commit is contained in:
Julien Duponchelle committed 2015-01-20 13:24:00 +01:00
1 parent 7f185663d1
commit f5ed9fbcf1
124 files changed
+340 -210

No files matched your search

+28 -26
View File
@@ -31,6 +31,7 @@ if sys.platform.startswith("win"):
class TelnetServer(threading.Thread):
"""
Mini Telnet Server.
@@ -226,37 +227,38 @@ class TelnetServer(threading.Thread):
# Mostly from https://code.google.com/p/miniboa/source/browse/trunk/miniboa/telnet.py
# Telnet Commands
SE = 240 # End of sub-negotiation parameters
NOP = 241 # No operation
DATMK = 242 # Data stream portion of a sync.
BREAK = 243 # NVT Character BRK
IP = 244 # Interrupt Process
AO = 245 # Abort Output
AYT = 246 # Are you there
EC = 247 # Erase Character
EL = 248 # Erase Line
GA = 249 # The Go Ahead Signal
SB = 250 # Sub-option to follow
WILL = 251 # Will; request or confirm option begin
WONT = 252 # Wont; deny option request
DO = 253 # Do = Request or confirm remote option
DONT = 254 # Don't = Demand or confirm option halt
IAC = 255 # Interpret as Command
SEND = 1 # Sub-process negotiation SEND command
IS = 0 # Sub-process negotiation IS command
SE = 240 # End of sub-negotiation parameters
NOP = 241 # No operation
DATMK = 242 # Data stream portion of a sync.
BREAK = 243 # NVT Character BRK
IP = 244 # Interrupt Process
AO = 245 # Abort Output
AYT = 246 # Are you there
EC = 247 # Erase Character
EL = 248 # Erase Line
GA = 249 # The Go Ahead Signal
SB = 250 # Sub-option to follow
WILL = 251 # Will; request or confirm option begin
WONT = 252 # Wont; deny option request
DO = 253 # Do = Request or confirm remote option
DONT = 254 # Don't = Demand or confirm option halt
IAC = 255 # Interpret as Command
SEND = 1 # Sub-process negotiation SEND command
IS = 0 # Sub-process negotiation IS command
# Telnet Options
BINARY = 0 # Transmit Binary
ECHO = 1 # Echo characters back to sender
RECON = 2 # Reconnection
SGA = 3 # Suppress Go-Ahead
TMARK = 6 # Timing Mark
TTYPE = 24 # Terminal Type
NAWS = 31 # Negotiate About Window Size
LINEMO = 34 # Line Mode
BINARY = 0 # Transmit Binary
ECHO = 1 # Echo characters back to sender
RECON = 2 # Reconnection
SGA = 3 # Suppress Go-Ahead
TMARK = 6 # Timing Mark
TTYPE = 24 # Terminal Type
NAWS = 31 # Negotiate About Window Size
LINEMO = 34 # Line Mode
class TelnetClient(object):
"""
Represents a Telnet client connection.
@@ -45,6 +45,7 @@ log = logging.getLogger(__name__)
class VirtualBoxVM(BaseVM):
"""
VirtualBox VM implementation.
"""
@@ -58,7 +59,7 @@ class VirtualBoxVM(BaseVM):
self._system_properties = {}
#FIXME: harcoded values
# FIXME: harcoded values
if sys.platform.startswith("win"):
self._vboxmanage_path = r"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
else:
@@ -367,7 +368,6 @@ class VirtualBoxVM(BaseVM):
except OSError as e:
raise VirtualBoxError("Could not write HDD info file: {}".format(e))
log.info("VirtualBox VM {name} [id={id}] has been deleted".format(name=self._name,
id=self._id))
@@ -386,9 +386,9 @@ class VirtualBoxVM(BaseVM):
if self._linked_clone:
self._execute("unregistervm", [self._vmname, "--delete"])
#try:
# try:
# shutil.rmtree(self._working_dir)
#except OSError as e:
# except OSError as e:
# log.error("could not delete VirtualBox VM {name} [id={id}]: {error}".format(name=self._name,
# id=self._id,
# error=e))