mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-25 01:06:05 +03:00
1 parent
bd7ac05a11
commit
d223770af8
1 file changed
+3
-1
@@ -115,13 +115,15 @@ def load_plugins():
|
||||
|
||||
found = []
|
||||
for name in os.listdir(config.plugin_dir):
|
||||
if name[0] == '.':
|
||||
if name[0] in ['.', '_']:
|
||||
pass
|
||||
elif name.endswith('.disabled'):
|
||||
name, discard = name.rsplit('.', 1)
|
||||
found.append(Plugin(name, None))
|
||||
else:
|
||||
try:
|
||||
# Add plugin's folder to Python's load path in case plugin has dependencies.
|
||||
sys.path.append(os.path.join(config.plugin_dir, name))
|
||||
found.append(Plugin(name, os.path.join(config.plugin_dir, name, 'load.py')))
|
||||
except:
|
||||
print_exc()
|
||||
|
||||
Reference in new issue
Block a user