Do not load Okteto pinger if userbot is not installed there

pull/1/head
hikari.ftg 2022-03-27 13:28:28 +00:00
parent 7769fdf742
commit da84182164
1 changed files with 6 additions and 1 deletions

View File

@ -237,7 +237,12 @@ class Modules:
mods = [
os.path.join(utils.get_base_dir(), MODULES_NAME, mod)
for mod in filter(
lambda x: (len(x) > 3 and x[-3:] == ".py" and x[0] != "_"),
lambda x: (
len(x) > 3
and x[-3:] == ".py"
and x[0] != "_"
and ("OKTETO" in os.environ or x != "okteto.py")
),
os.listdir(os.path.join(utils.get_base_dir(), MODULES_NAME)),
)
]