Merge pull request #95 from moreati/lgtm

Address lgtm.com warnings
pull/107/head
dw 8 years ago committed by GitHub
commit 5d68d6499d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
path_classifiers:
thirdparty:
- "mitogen/compat/*.py"

@ -121,9 +121,15 @@ class TimeoutError(Error):
class Dead(object):
def __hash__(self):
return hash(Dead)
def __eq__(self, other):
return type(other) is Dead
def __ne__(self, other):
return type(other) is not Dead
def __reduce__(self):
return (_unpickle_dead, ())

@ -519,7 +519,14 @@ class ModuleForwarder(object):
tup = self.importer._cache[fullname]
if tup is not None:
for related in tup[4]:
rtup = self.importer._cache[fullname]
LOG.debug('%r._on_get_module(): trying related %r',
self, related)
try:
rtup = self.importer._cache[related]
except KeyError:
LOG.warn('%r._on_get_module(): skipping %r, not in cache',
self, related)
continue
self._send_one_module(msg, rtup)
self._send_one_module(msg, tup)

@ -126,5 +126,4 @@ class Stream(mitogen.parent.Stream):
LOG.debug('sending password')
self.transmit_side.write(self.password + '\n')
password_sent = True
else:
raise mitogen.core.StreamError('bootstrap failed')
raise mitogen.core.StreamError('bootstrap failed')

@ -107,5 +107,4 @@ class Stream(mitogen.parent.Stream):
LOG.debug('sending password')
os.write(self.transmit_side.fd, self.password + '\n')
password_sent = True
else:
raise mitogen.core.StreamError('bootstrap failed')
raise mitogen.core.StreamError('bootstrap failed')

Loading…
Cancel
Save