Strip extension from addon IDs.

This commit is contained in:
2016-06-22 00:15:28 +02:00
parent 1db0d0dec4
commit 5548c26af4

View File

@@ -41,18 +41,20 @@ def iter_addons(addons_dir: str) -> (str, str):
"""
for item in os.scandir(addons_dir):
if item.name[0] == '.':
if item.name.startswith('.'):
continue
base, ext = os.path.splitext(item.name)
if item.is_dir():
fname = os.path.join(item.path, '__init__.py')
if not os.path.exists(fname):
log.info('Skipping %s, it does not seem to be a Python package', item.path)
continue
yield (item.name, fname)
yield (base, fname)
else:
yield (item.name, item.path)
yield (base, item.path)
def parse_blinfo(addon_fname: str) -> dict: