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