fixup! Add standard python build files

This commit is contained in:
Cédric Leporcq 2021-10-30 08:45:11 +02:00
parent 2a9230c49c
commit 9ec95d99f1
1 changed files with 7 additions and 7 deletions

View File

@ -7,12 +7,10 @@ import sys
import click import click
from ordigi.config import Config from ordigi.config import Config
from ordigi import constants
from ordigi import log from ordigi import log
from ordigi.collection import Collection from ordigi.collection import Collection
from ordigi.geolocation import GeoLocation from ordigi.geolocation import GeoLocation
_logger_options = [ _logger_options = [
click.option( click.option(
'--debug', '--debug',
@ -136,7 +134,7 @@ def get_collection_config(root):
def _get_paths(paths, root): def _get_paths(paths, root):
if not paths: if not paths:
paths = root paths = [root]
paths = set(paths) paths = set(paths)
return paths, root return paths, root
@ -239,8 +237,10 @@ def _sort(**kwargs):
subdirs = kwargs['subdirs'] subdirs = kwargs['subdirs']
root = kwargs['dest'] root = kwargs['dest']
paths, root = _get_paths(subdirs, root) subpaths, root = _get_paths(subdirs, root)
paths = os.path.join(root, subdirs) paths = set()
for subpath in subpaths:
paths.add(os.path.join(root, subpath))
cache = True cache = True
if kwargs['reset_cache']: if kwargs['reset_cache']:
@ -538,5 +538,5 @@ main.add_command(_sort)
main.add_command(_update) main.add_command(_update)
if __name__ == '__main__': # if __name__ == '__main__':
main() # main()