1
0
mirror of synced 2024-11-25 10:44:23 +01:00

Improve a bit parsers autoloading

This commit is contained in:
jvoisin 2018-06-10 00:28:26 +02:00
parent 0079b4e8e9
commit 633654376a

View File

@ -14,7 +14,7 @@ def __load_all_parsers():
""" Loads every parser in a dynamic way """
current_dir = os.path.dirname(__file__)
for name in glob.glob(os.path.join(current_dir, '*.py')):
if name in ('abstract.py', '__init__.py'):
if name.endswith('abstract.py') or name.endswith('__init__.py'):
continue
basename = os.path.basename(name)
name, _ = os.path.splitext(basename)