From 1ee5238ad7420bb71dc03d997c32196a3cf32a4a Mon Sep 17 00:00:00 2001 From: Michael H Date: Mon, 23 Sep 2019 10:52:48 -0400 Subject: [PATCH] Remove a specific f-string usage in the launcher. (#3002) * @Kowlin I saw that error * style --- changelog.d/3002.bugfix.rst | 1 + redbot/launcher.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog.d/3002.bugfix.rst diff --git a/changelog.d/3002.bugfix.rst b/changelog.d/3002.bugfix.rst new file mode 100644 index 000000000..bf19c1b76 --- /dev/null +++ b/changelog.d/3002.bugfix.rst @@ -0,0 +1 @@ +remove f-string usage in launcher to prevent our error handling from cauing an error. \ No newline at end of file diff --git a/redbot/launcher.py b/redbot/launcher.py index 03e4b49ef..3c2628168 100644 --- a/redbot/launcher.py +++ b/redbot/launcher.py @@ -450,9 +450,10 @@ def main(): args, flags_to_pass = parse_cli_args() if not PYTHON_OK: print( - f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you " - f"have {sys.version}! Please update Python." - ) + "Python {req_ver} is required to run Red, but you have {sys_ver}!".format( + req_ver=".".join(map(str, MIN_PYTHON_VERSION)), sys_ver=sys.version + ) + ) # Don't make an f-string, these may not exist on the python version being rejected! sys.exit(1) if args.debuginfo: # Check first since the function triggers an exit debug_info()