aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/util.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-10-31 13:40:53 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-10-31 13:52:31 -0400
commitfc5353364a3d7ea48fb089926e968fa52177a173 (patch)
tree0b80da183ab08bfa4e76fa22c9e9133cccc348af /klippy/util.py
parent7a6fd1a1aa1ad39a401887619c33cb49e55adfea (diff)
downloadkutter-fc5353364a3d7ea48fb089926e968fa52177a173.tar.gz
kutter-fc5353364a3d7ea48fb089926e968fa52177a173.tar.xz
kutter-fc5353364a3d7ea48fb089926e968fa52177a173.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/util.py')
-rw-r--r--klippy/util.py2
1 files changed, 1 insertions, 1 deletions
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: