| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -419,9 +419,11 @@ def __enter__(self): | |||
| 419 | 419 | if self.watcher: | |
| 420 | 420 | # for reading modules if they fail to load | |
| 421 | 421 | old_module_locations = {} | |
| 422 | + default_level = 0 if py3 else -1 | ||
| 422 | 423 | ||
| 423 | 424 | @functools.wraps(self.orig_import) | |
| 424 | - def new_import(name, globals={}, locals={}, fromlist=[], level=-1): | ||
| 425 | + def new_import(name, globals={}, locals={}, fromlist=[], | ||
| 426 | + level=default_level): | ||
| 425 | 427 | try: | |
| 426 | 428 | m = self.orig_import(name, globals=globals, locals=locals, | |
| 427 | 429 | fromlist=fromlist, level=level) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments