Fixed typo n stuff

This commit is contained in:
GodSaveTheDoge 2022-02-10 15:54:29 +01:00
parent 93a127beed
commit a868ce2196
1 changed files with 14 additions and 12 deletions

View File

@ -8,21 +8,23 @@
import sys
import os
mods = [
[
f.split(".", 1)[0]
for f in os.listdir(spath)
if f.endswith(".py")
or (
os.path.isdir(f)
and os.path.exists(os.path.join(f, "__init__.p__init__.py"))
)
]
__all__ = [
f.split(".", 1)[0]
for spath in sys.path
if os.path.exists(spath)
for f in os.listdir(spath)
if f.endswith(".py")
or (
os.path.isdir(os.path.join(spath,f))
and os.path.exists(os.path.join(os.path.join(spath, f), "__init__.py"))
)
]
__all__ = [f for m in mods for f in m]
__path__ = []
def __getattr__(name):
return __import__(name)
try:
return __import__(name)
except Exception as e:
return e