From fc5353364a3d7ea48fb089926e968fa52177a173 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 31 Oct 2021 13:40:53 -0400 Subject: [PATCH] util: Use regular str() type in get_git_version() on Python2 Avoid using unicode() types on Python2 as it can lead to subtle errors. Signed-off-by: Kevin O'Connor --- klippy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/util.py b/klippy/util.py index 4f018b0f..c21ace28 100644 --- a/klippy/util.py +++ b/klippy/util.py @@ -146,7 +146,7 @@ def get_git_version(from_file=True): ver, err = process.communicate() retcode = process.wait() if retcode == 0: - return ver.strip().decode() + return str(ver.strip().decode()) else: logging.debug("Error getting git version: %s", err) except: