Skip to content

Commit

Permalink
fix: argument source was not correctly set (#49)
Browse files Browse the repository at this point in the history
* feat: create polygon script return temporary file path

* fix: main return value and formatting

* feat: Allow Create Polygons script to run with multiple files

* fix: argument source was not correctly set
  • Loading branch information
paulfouquet authored Jul 13, 2022
1 parent 8372cc7 commit 44ff66f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/create_polygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main() -> List[str]: # pylint: disable=too-many-locals
logger = get_log()

parser = argparse.ArgumentParser()
parser.add_argument("--source", dest="source", required=True)
parser.add_argument("--source", dest="source", nargs="+", required=True)
arguments = parser.parse_args()
source = arguments.source

Expand All @@ -53,6 +53,7 @@ def main() -> List[str]: # pylint: disable=too-many-locals
for file in source:
with tempfile.TemporaryDirectory() as tmp_dir:
source_file_name = os.path.basename(file)
uri_parse = file
# Download the file
if str(file).startswith("s3://"):
uri_parse = urlparse(file, allow_fragments=False)
Expand Down

0 comments on commit 44ff66f

Please sign in to comment.