Improve a bit parsers autoloading
This commit is contained in:
parent
0079b4e8e9
commit
633654376a
@ -14,7 +14,7 @@ def __load_all_parsers():
|
|||||||
""" Loads every parser in a dynamic way """
|
""" Loads every parser in a dynamic way """
|
||||||
current_dir = os.path.dirname(__file__)
|
current_dir = os.path.dirname(__file__)
|
||||||
for name in glob.glob(os.path.join(current_dir, '*.py')):
|
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
|
continue
|
||||||
basename = os.path.basename(name)
|
basename = os.path.basename(name)
|
||||||
name, _ = os.path.splitext(basename)
|
name, _ = os.path.splitext(basename)
|
||||||
|
Loading…
Reference in New Issue
Block a user