summary refs log tree commit diff
path: root/synapse/util/versionstring.py
diff options
context:
space:
mode:
authorhera <matrix@template.upcloud.com>2018-08-21 19:12:14 +0000
committerhera <matrix@template.upcloud.com>2018-08-21 19:12:14 +0000
commitd1065e6f512447e6ba9dc4beddf26695880023e1 (patch)
tree4c54a1e7e9f62bda2689bd47f69d65708fd3b7c8 /synapse/util/versionstring.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentchangelog (diff)
downloadsynapse-d1065e6f512447e6ba9dc4beddf26695880023e1.tar.xz
Merge tag 'v0.33.3rc2' into matrix-org-hotfixes
Bugfixes
--------

- Fix bug in v0.33.3rc1 which caused infinite loops and OOMs
([\#3723](https://github.com/matrix-org/synapse/issues/3723))
Diffstat (limited to 'synapse/util/versionstring.py')
-rw-r--r--synapse/util/versionstring.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/util/versionstring.py b/synapse/util/versionstring.py

index 1fbcd41115..3baba3225a 100644 --- a/synapse/util/versionstring.py +++ b/synapse/util/versionstring.py
@@ -30,7 +30,7 @@ def get_version_string(module): ['git', 'rev-parse', '--abbrev-ref', 'HEAD'], stderr=null, cwd=cwd, - ).strip() + ).strip().decode('ascii') git_branch = "b=" + git_branch except subprocess.CalledProcessError: git_branch = "" @@ -40,7 +40,7 @@ def get_version_string(module): ['git', 'describe', '--exact-match'], stderr=null, cwd=cwd, - ).strip() + ).strip().decode('ascii') git_tag = "t=" + git_tag except subprocess.CalledProcessError: git_tag = "" @@ -50,7 +50,7 @@ def get_version_string(module): ['git', 'rev-parse', '--short', 'HEAD'], stderr=null, cwd=cwd, - ).strip() + ).strip().decode('ascii') except subprocess.CalledProcessError: git_commit = "" @@ -60,7 +60,7 @@ def get_version_string(module): ['git', 'describe', '--dirty=' + dirty_string], stderr=null, cwd=cwd, - ).strip().endswith(dirty_string) + ).strip().decode('ascii').endswith(dirty_string) git_dirty = "dirty" if is_dirty else "" except subprocess.CalledProcessError: @@ -77,8 +77,8 @@ def get_version_string(module): "%s (%s)" % ( module.__version__, git_version, ) - ).encode("ascii") + ) except Exception as e: logger.info("Failed to check for git repository: %s", e) - return module.__version__.encode("ascii") + return module.__version__