diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-10-31 13:40:53 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-10-31 13:52:31 -0400 |
commit | fc5353364a3d7ea48fb089926e968fa52177a173 (patch) | |
tree | 0b80da183ab08bfa4e76fa22c9e9133cccc348af | |
parent | 7a6fd1a1aa1ad39a401887619c33cb49e55adfea (diff) | |
download | kutter-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>
-rw-r--r-- | klippy/util.py | 2 |
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: |