Make flake8 happy.

This commit is contained in:
JohnHay 2021-12-21 16:12:11 +02:00
parent 2665b67926
commit e6f076e1a5

View File

@ -33,7 +33,7 @@ def ipfw_rule_exists(n):
found = False found = False
for line in p.stdout: for line in p.stdout:
if line.startswith(b'%05d ' % n): if line.startswith(b'%05d ' % n):
if not 'check-state :sshuttle' in line: if 'check-state :sshuttle' not in line:
log('non-sshuttle ipfw rule: %r' % line.strip()) log('non-sshuttle ipfw rule: %r' % line.strip())
raise Fatal('non-sshuttle ipfw rule #%d already exists!' % n) raise Fatal('non-sshuttle ipfw rule #%d already exists!' % n)
found = True found = True
@ -201,8 +201,8 @@ class Method(BaseMethod):
if subnets: if subnets:
# create new subnet entries # create new subnet entries
for _, swidth, sexclude, snet, fport, lport in sorted(subnets, for _, swidth, sexclude, snet, fport, lport in sorted(subnets,
key=lambda s: s[1], key=lambda s: s[1],
reverse=True): reverse=True):
if sexclude: if sexclude:
ipfw('table', '125', 'add', '%s/%s' % (snet, swidth)) ipfw('table', '125', 'add', '%s/%s' % (snet, swidth))
else: else: