Fix absolute path in cli.py

This commit is contained in:
Cédric Leporcq 2022-04-17 21:47:08 +02:00
parent 14234f12cb
commit cf8b6a9dec
1 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ _logger_options = [
'--verbose', '--verbose',
'-v', '-v',
default='WARNING', default='WARNING',
help='True if you want to see details of file processing', help='Log level [WARNING,INFO,DEBUG,NOTSET]',
), ),
] ]
@ -121,13 +121,13 @@ def add_options(options):
def _get_paths(paths, root): def _get_paths(paths, root):
root = Path(root).expanduser().absolute() root = Path(root).expanduser().absolute()
if not paths: if not paths:
paths = {root} absolute_paths = {root}
else: else:
paths = set() absolute_paths = set()
for path in paths: for path in paths:
paths.add(Path(path).expanduser().absolute()) absolute_paths.add(Path(path).expanduser().absolute())
return paths, root return absolute_paths, root
def _cli_get_location(collection): def _cli_get_location(collection):