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

+2 -1
View File
@@ -56,6 +56,7 @@ log = logging.getLogger(__name__)
class IOU(IModule):
"""
IOU module.
@@ -635,7 +636,7 @@ class IOU(IModule):
rhost = request["nio"]["rhost"]
rport = request["nio"]["rport"]
try:
#TODO: handle IPv6
# TODO: handle IPv6
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:
sock.connect((rhost, rport))
except OSError as e:
@@ -17,6 +17,7 @@
class Adapter(object):
"""
Base class for adapters.
@@ -19,6 +19,7 @@ from .adapter import Adapter
class EthernetAdapter(Adapter):
"""
IOU Ethernet adapter.
"""
@@ -19,6 +19,7 @@ from .adapter import Adapter
class SerialAdapter(Adapter):
"""
IOU Serial adapter.
"""
+1
View File
@@ -43,6 +43,7 @@ log = logging.getLogger(__name__)
class IOUDevice(object):
"""
IOU device implementation.
+17 -16
View File
@@ -56,22 +56,22 @@ EXIT_ABORT = 2
# 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
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 ]----------------------------------------------------------
@@ -154,6 +154,7 @@ class FileLock:
class Console:
def fileno(self):
raise NotImplementedError("Only routers have fileno()")
+1
View File
@@ -21,6 +21,7 @@ Base interface for NIOs.
class NIO(object):
"""
Network Input/Output.
"""
@@ -23,6 +23,7 @@ from .nio import NIO
class NIO_GenericEthernet(NIO):
"""
Generic Ethernet NIO.
+1
View File
@@ -23,6 +23,7 @@ from .nio import NIO
class NIO_TAP(NIO):
"""
TAP NIO.
+1
View File
@@ -23,6 +23,7 @@ from .nio import NIO
class NIO_UDP(NIO):
"""
UDP NIO.