diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 7332874..decda2c 100755 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -226,7 +226,11 @@ class Client(object): def load_plugins(self, base=os.path.join(utils.basedir(), 'client.d')): global parse_path, example_path, ignore_file, sync_extensions, encode base = os.path.expanduser(base) - for path in sorted(glob('%s%s*.py' % (base, os.sep))): + for name in sorted(os.listdir(base)): + if not name.endswith('.py'): + continue + path = os.path.join(base, name) + with open(path) as fp: module = imp.load_source(os.path.basename(path).split('.')[0], base, fp) if hasattr(module, 'parse_path'):