mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: a cited module may be a package
python -m runs a package by its __main__.py: scripts.scraper.romfolders is one.
This commit is contained in:
1 parent
8848f3e6f6
commit
fa9fbbed9e
1 file changed
+3
-1
@@ -1270,7 +1270,9 @@ class CitedScriptsExist(unittest.TestCase):
|
||||
found = []
|
||||
for number, target, module, _args in _commands(text):
|
||||
path = ROOT / (target.replace(".", "/") + ".py" if module else target)
|
||||
if not path.is_file():
|
||||
# `python -m` also runs a package by its __main__.py.
|
||||
package = ROOT / target.replace(".", "/") / "__main__.py" if module else None
|
||||
if not path.is_file() and not (package and package.is_file()):
|
||||
found.append(f"{number}: {target}")
|
||||
found += [
|
||||
f"{number}: {name}"
|
||||
|
||||
Reference in new issue
Block a user