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