Skip to content

Commit

Permalink
more logging, do not lower name for matching games
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGoogle committed Oct 20, 2019
1 parent b92adac commit beae275
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/local/pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ async def scan(path: Union[str, os.PathLike], candidates: Set[str], similarity:
root, dirs, _ = next(os.walk(path))
for dir_name in dirs:
await asyncio.sleep(0)
matches_ = difflib.get_close_matches(dir_name.lower(), list(candidates), cutoff=similarity)
matches_ = difflib.get_close_matches(dir_name, list(candidates), cutoff=similarity)
logging.debug(f'{dir_name}, cands: {list(candidates)}, matches: {matches_}')
matches = cast(List[str], matches_) # as str is Sequence[str]r - mypy/issues/5090
if matches:
logging.info(f'found close ({similarity}) matches for {dir_name}: [{matches}]')
logging.info(f'found close ({similarity}) matches for {dir_name}: {matches}')
for app_name in matches:
dir_path = PurePath(root) / dir_name
executables = self.find_executables(dir_path)
Expand Down
2 changes: 2 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def copy(c, output=DIST_PLUGIN, galaxy_path=GALAXY_PATH):
print('copying source code ...')
for file_ in glob("src/*.py"):
shutil.copy(file_, output)
for file_ in glob("src/local/*.py"):
shutil.copy(file_, Path(output) / 'local')
for file_ in glob("src/*.ini"):
shutil.copy(file_, output)

Expand Down

0 comments on commit beae275

Please sign in to comment.