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
This commit is contained in:
Alex Willmer 2018-02-22 21:39:43 +00:00 committed by David Wilson
parent 5036a9448f
commit 8513b331b7
1 changed files with 1 additions and 1 deletions

View File

@ -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