fix remaining pep8 complaints
This commit is contained in:
parent
b216c0adf3
commit
dada79d85c
|
@ -11,8 +11,8 @@ def handle_welcome(welcome, relay_url, my_version, stderr):
|
|||
|
||||
# Only warn if we're running a release version (e.g. 0.0.6, not
|
||||
# 0.0.6+DISTANCE.gHASH). Only warn once.
|
||||
if ("current_cli_version" in welcome and "+" not in my_version
|
||||
and welcome["current_cli_version"] != my_version):
|
||||
if ("current_cli_version" in welcome and "+" not in my_version and
|
||||
welcome["current_cli_version"] != my_version):
|
||||
print(
|
||||
("Warning: errors may occur unless both sides are running the"
|
||||
" same version"),
|
||||
|
|
|
@ -684,7 +684,7 @@ class PregeneratedCode(ServerBase, ScriptsBase, unittest.TestCase):
|
|||
self.failUnlessEqual(receive_stdout, "")
|
||||
self.failUnlessIn(u"Receiving file ({size:s}) into: {name}".format(
|
||||
size=naturalsize(len(message)), name=receive_filename),
|
||||
receive_stderr)
|
||||
receive_stderr)
|
||||
self.failUnlessIn(u"Received file written to ", receive_stderr)
|
||||
fn = os.path.join(receive_dir, receive_filename)
|
||||
self.failUnless(os.path.exists(fn))
|
||||
|
|
|
@ -751,12 +751,12 @@ class Common:
|
|||
if hint_type not in [u"direct-tcp-v1", u"tor-tcp-v1"]:
|
||||
log.msg("unknown hint type: %r" % (hint, ))
|
||||
return None
|
||||
if not (u"hostname" in hint
|
||||
and isinstance(hint[u"hostname"], type(u""))):
|
||||
if not (u"hostname" in hint and
|
||||
isinstance(hint[u"hostname"], type(u""))):
|
||||
log.msg("invalid hostname in hint: %r" % (hint, ))
|
||||
return None
|
||||
if not (u"port" in hint
|
||||
and isinstance(hint[u"port"], six.integer_types)):
|
||||
if not (u"port" in hint and
|
||||
isinstance(hint[u"port"], six.integer_types)):
|
||||
log.msg("invalid port in hint: %r" % (hint, ))
|
||||
return None
|
||||
priority = hint.get(u"priority", 0.0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user