Skip to content

Commit 3bb46e6

Browse files
author
Alessandro Dalvit
authored
fix: Assume exiftool path could contain whitespaces (#660)
* fix: Assume exiftool path could contain whitespaces * fix: Try to make mypy in github happy
1 parent d492954 commit 3bb46e6

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

mapillary_tools/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def wrap_http_exception(ex: requests.HTTPError):
6666
lines = [
6767
f"{ex.request.method} {resp.url}",
6868
f"> HTTP Status: {ex.response.status_code}",
69-
f"{resp.content}",
69+
str(resp.content),
7070
]
7171
return UploadHTTPError("\n".join(lines))
7272

mapillary_tools/video_data_extraction/extractors/exiftool_runtime_parser.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,17 @@ def __init__(
3737

3838
if not self.geotag_source_path:
3939
return
40-
args = f"{exiftool_path} -q -r -n -ee -api LargeFileSupport=1 -X".split(" ")
41-
args.append(str(self.geotag_source_path))
40+
args = [
41+
exiftool_path,
42+
"-q",
43+
"-r",
44+
"-n",
45+
"-ee",
46+
"-api",
47+
"LargeFileSupport=1",
48+
"-X",
49+
str(self.geotag_source_path),
50+
]
4251

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

0 commit comments

Comments
 (0)