- for filename in os.listdir(basePath):
- if filename.startswith('.'):
- continue
- if filename.startswith('_'):
- continue
- if os.path.isdir(os.path.join(basePath, filename)):
- if os.path.exists(os.path.join(basePath, filename, 'script.py')):
- _pluginList.append(pluginInfo(basePath, os.path.join(filename, 'script.py')))
- elif filename.endswith('.py'):
- _pluginList.append(pluginInfo(basePath, filename))
+ if os.path.isdir(basePath):
+ for filename in os.listdir(basePath):
+ if filename.startswith('.'):
+ continue
+ if filename.startswith('_'):
+ continue
+ if os.path.isdir(os.path.join(basePath, filename)):
+ if os.path.exists(os.path.join(basePath, filename, 'script.py')):
+ _pluginList.append(pluginInfo(basePath, os.path.join(filename, 'script.py')))
+ elif filename.endswith('.py'):
+ _pluginList.append(pluginInfo(basePath, filename))