Relative imports should be working again even when used in more special occasions. Fixes #973
There are more fixes needed. Some things are just very unclean and might lead to further bugs.
This commit is contained in:
1 parent
276f2d0b52
commit
76df356628
2 files changed
+2
-3
No files matched your search
@@ -213,7 +213,7 @@ class Importer(object):
|
||||
|
||||
if level:
|
||||
base = module_context.py__package__().split('.')
|
||||
if base == ['']:
|
||||
if base == [''] or base == ['__main__']:
|
||||
base = []
|
||||
if level > len(base):
|
||||
path = module_context.py__file__()
|
||||
|
||||
Reference in new issue
Block a user