Commit 8513b331 authored by Alex Willmer's avatar Alex Willmer Committed by David Wilson

Use Pythabsoluteon 2.4 compatible module import

Python 2.4 does not support explicit relative imports. They were added
at Python 2.5, along with `from __future__ import absolute_import`.

On 2.x this will mean the import is first (implicitly) tried relative,
but on 3.x it will always be tried absolute.

Fixes #92
parent 5036a944
......@@ -99,7 +99,7 @@ def main(log_level='INFO'):
def wrapper(func):
if func.__module__ != '__main__':
return func
from . import utils
from mitogen import utils
utils.log_to_file(level=log_level)
return utils.run_with_router(func)
return wrapper
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment