From 8513b331b7cefed9b70f2a9c0a268cb51fc76e36 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 22 Feb 2018 21:39:43 +0000 Subject: [PATCH] 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 --- mitogen/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitogen/__init__.py b/mitogen/__init__.py index 2c7a1c5d..d83365df 100644 --- a/mitogen/__init__.py +++ b/mitogen/__init__.py @@ -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