Commit 98504101 authored by Andreas Rammhold's avatar Andreas Rammhold Committed by Peter V. Saveliev

pep8: fixed whitespace issues that came up with flake8>=3.2.0 (#312)

parent fea8d1fc
......@@ -52,6 +52,7 @@ class SocketWrapper(object):
def dup(self):
return self.__class__(_sock=self._sock.dup())
config.SocketBase = SocketWrapper
print(netns.listnetns())
......
......@@ -34,6 +34,7 @@ class Rlink(GenericNetlinkSocket):
msg_flags=NLM_F_REQUEST)[0]
return ret.get_attr('RLINK_ATTR_DATA')
try:
# create protocol instance
rlink = Rlink()
......
......@@ -38,6 +38,7 @@ def cb(ipdb, msg, action):
except Exception:
pass
# create IPDB instance
with IPDB() as ip:
# create watchdogs
......
......@@ -18,6 +18,7 @@ def cb(ipdb, msg, action):
if action == 'RTM_NEWLINK':
msg['flags'] = 1234
# create IPDB instance
ip = IPDB()
# register "pre" callback
......
......@@ -146,6 +146,8 @@ class __common(object):
log.warning('module pyroute2.ipdb.common is deprecated, '
'use pyroute2.ipdb.exceptions instead')
return getattr(globals()['ipdb'].exceptions, key)
globals()['ipdb'].common = __common()
__all__.extend([x.__name__ for x in exceptions])
......@@ -121,6 +121,7 @@ class WatchdogKey(dict):
'gateway',
'table') and x[1]])
# Universal route key
RouteKey = namedtuple('RouteKey',
('dst',
......
......@@ -415,6 +415,7 @@ _de = NetlinkDecodeError #
class NotInitialized(Exception):
pass
_letters = re.compile('[A-Za-z]')
_fmt_letters = re.compile('[^!><@=][!><@=]')
......
......@@ -37,6 +37,7 @@ class sock_diag_req(nlmsg):
fields = (('sdiag_family', 'B'),
('sdiag_protocol', 'B'))
UDIAG_SHOW_NAME = 0x01
UDIAG_SHOW_VFS = 0x02
UDIAG_SHOW_PEER = 0x04
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment