pass E.pkg as module object for importlib_resources compatibility
This commit is contained in:
parent
0ce389f02a
commit
ee4bf22ec2
@ -54,7 +54,7 @@ except:
|
||||
|
||||
class EnvParams(object):
|
||||
def __init__(self) -> None:
|
||||
self.pkg = ""
|
||||
self.pkg = None
|
||||
self.t0 = time.time()
|
||||
self.mod = ""
|
||||
self.cfg = ""
|
||||
|
@ -217,7 +217,7 @@ def init_E(EE: EnvParams) -> None:
|
||||
|
||||
raise Exception("could not find a writable path for config")
|
||||
|
||||
E.pkg = __package__
|
||||
E.pkg = sys.modules[__package__]
|
||||
E.mod = os.path.dirname(os.path.realpath(__file__))
|
||||
if E.mod.endswith("__init__"):
|
||||
E.mod = os.path.dirname(E.mod)
|
||||
|
Loading…
Reference in New Issue
Block a user