Merge pull request #612 from marc1006/master

Some smaller fixes
pull/618/head
dw 6 years ago committed by GitHub
commit c6de090f08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -542,7 +542,7 @@ def extend_path(path, name):
if os.path.isfile(pkgfile): if os.path.isfile(pkgfile):
try: try:
f = open(pkgfile) f = open(pkgfile)
except IOError, msg: except IOError as msg:
sys.stderr.write("Can't open %s: %s\n" % sys.stderr.write("Can't open %s: %s\n" %
(pkgfile, msg)) (pkgfile, msg))
else: else:

@ -462,7 +462,7 @@ class DefectivePython3xMainMethod(FinderMethod):
return None return None
path = getattr(mod, '__file__', None) path = getattr(mod, '__file__', None)
if not (os.path.exists(path) and _looks_like_script(path)): if not (path is not None and os.path.exists(path) and _looks_like_script(path)):
return None return None
fp = open(path, 'rb') fp = open(path, 'rb')

@ -2331,7 +2331,7 @@ class Router(mitogen.core.Router):
directly connected. directly connected.
""" """
stream = self.stream_by_id(context) stream = self.stream_by_id(context)
if stream.remote_id != context.context_id: if stream.protocol.remote_id != context.context_id:
return return
l = mitogen.core.Latch() l = mitogen.core.Latch()

Loading…
Cancel
Save