issue #213: use import_module() in parent.py.

This dynamic import crap really needs to be ripped out of parent.py
again. Static imports work much better for the module loader too.
pull/255/head
David Wilson 7 years ago
parent e118963b30
commit 3f595bbc7e

@ -492,9 +492,8 @@ def stream_by_method_name(name):
""" """
if name == 'local': if name == 'local':
name = 'parent' name = 'parent'
Stream = None module = mitogen.core.import_module('mitogen.' + name)
exec('from mitogen.%s import Stream' % (name,)) return module.Stream
return Stream
@mitogen.core.takes_econtext @mitogen.core.takes_econtext

Loading…
Cancel
Save