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':
name = 'parent'
Stream = None
exec('from mitogen.%s import Stream' % (name,))
return Stream
module = mitogen.core.import_module('mitogen.' + name)
return module.Stream
@mitogen.core.takes_econtext

Loading…
Cancel
Save