Cleanup: take advantage of pathlib
* Use / syntax for concating pathlib paths in tests * Use .name for getting last component of pathlib path
This commit is contained in:
@@ -50,7 +50,7 @@ def extract_blinfo(path: pathlib.Path) -> dict:
|
||||
|
||||
source = None
|
||||
# get last component of path
|
||||
addon_name = path.parts[-1]
|
||||
addon_name = path.name
|
||||
|
||||
if path.is_dir():
|
||||
with open(path / '__init__.py', 'r') as f:
|
||||
@@ -87,7 +87,7 @@ def make_repo(repopath: pathlib.Path):
|
||||
|
||||
for addon_path in repopath.iterdir():
|
||||
package_datum = {}
|
||||
addon = addon_path.parts[-1]
|
||||
addon = addon_path.name
|
||||
|
||||
try:
|
||||
bl_info = extract_blinfo(addon_path)
|
||||
|
Reference in New Issue
Block a user