From 9b0587423994f17a4ff08d33db092490e79f1933 Mon Sep 17 00:00:00 2001 From: nicoulaj Date: Wed, 15 Nov 2017 09:52:37 +0100 Subject: [PATCH] #4: Initialize the import level at 0 instead of -1, for Python 3 compatibility --- import_profiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import_profiler.py b/import_profiler.py index 39b4819..9fdbb1f 100644 --- a/import_profiler.py +++ b/import_profiler.py @@ -116,7 +116,7 @@ def __exit__(self, *a, **kw): self.disable() def _profiled_import(self, name, globals=None, locals=None, fromlist=None, - level=-1, *a, **kw): + level=0, *a, **kw): if globals is None: context_name = None else: