Skip to content

Commit

Permalink
Fix traceback when running executable
Browse files Browse the repository at this point in the history
without providing ffmpeg
  • Loading branch information
ehendrix23 committed Aug 22, 2021
1 parent 91a95c1 commit 0c4ce7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tesla_dashcam/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.17"
__version__ = "0.1.18"
7 changes: 4 additions & 3 deletions tesla_dashcam/tesla_dashcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# different ones to be created based on where it should go to (stdout,
# log file, ...).

VERSION = {"major": 0, "minor": 1, "patch": 17, "beta": -1}
VERSION = {"major": 0, "minor": 1, "patch": 18, "beta": -1}
VERSION_STR = f"v{VERSION['major']}.{VERSION['minor']}.{VERSION['patch']}"

if VERSION["beta"] > -1:
Expand Down Expand Up @@ -3653,6 +3653,7 @@ def main() -> int:
"--ffmpeg",
required=False,
type=str,
default=argparse.SUPPRESS,
help="Full path and filename for alternative " "ffmpeg.",
)
else:
Expand Down Expand Up @@ -3811,8 +3812,8 @@ def main() -> int:
print(f"{get_current_timestamp()} Did not retrieve latest version info.")

internal_ffmpeg = getattr(args, "ffmpeg", None) is None and internal_ffmpeg
ffmpeg = getattr(args, "ffmpeg", ffmpeg_default)
if which(ffmpeg) is None:
ffmpeg = getattr(args, "ffmpeg", ffmpeg_default) or ""
if not internal_ffmpeg and (ffmpeg == "" or which(ffmpeg) is None):
print(
f"{get_current_timestamp()}ffmpeg is a requirement, unable to find {ffmpeg} executable. Please ensure it exist and is located "
f"within PATH environment or provide full path using parameter --ffmpeg."
Expand Down

0 comments on commit 0c4ce7a

Please sign in to comment.