Skip to content

Commit

Permalink
fix: Assume exiftool path could contain whitespaces (#660)
Browse files Browse the repository at this point in the history
* fix: Assume exiftool path could contain whitespaces

* fix: Try to make mypy in github happy
  • Loading branch information
malconsei authored Sep 22, 2023
1 parent d492954 commit 3bb46e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mapillary_tools/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def wrap_http_exception(ex: requests.HTTPError):
lines = [
f"{ex.request.method} {resp.url}",
f"> HTTP Status: {ex.response.status_code}",
f"{resp.content}",
str(resp.content),
]
return UploadHTTPError("\n".join(lines))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ def __init__(

if not self.geotag_source_path:
return
args = f"{exiftool_path} -q -r -n -ee -api LargeFileSupport=1 -X".split(" ")
args.append(str(self.geotag_source_path))
args = [
exiftool_path,
"-q",
"-r",
"-n",
"-ee",
"-api",
"LargeFileSupport=1",
"-X",
str(self.geotag_source_path),
]

xml_content = subprocess.run(args, capture_output=True, text=True).stdout

Expand Down

0 comments on commit 3bb46e6

Please sign in to comment.