From 5fc39b69011dd2fcba59daae27a23de6c95e423b Mon Sep 17 00:00:00 2001 From: Nash Sibanda Date: Wed, 24 Jul 2024 13:53:46 +0900 Subject: [PATCH] Specify utf-8 encoding in Popen --- version.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/version.py b/version.py index f75cef5..e0aeab8 100644 --- a/version.py +++ b/version.py @@ -65,8 +65,12 @@ def call_git_describe(abbrev=5): """ try: - p = Popen(['git', 'describe', '--long', '--tags', '--always', - '--abbrev=%d' % abbrev], stdout=PIPE, stderr=PIPE) + p = Popen( + ['git', 'describe', '--long', '--tags', '--always', '--abbrev=%d' % abbrev], + stdout=PIPE, + stderr=PIPE, + encoding='utf-8', + ) p.stderr.close() line = p.stdout.readlines()[0].strip()