diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2015-08-25 13:20:14 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2015-08-25 15:43:55 +0100 |
commit | 7d679eb4800df015c89ec9e4e7f82b815a051162 (patch) | |
tree | 4421b47d74c3c91bf338c2e997f40d0bfaae7df3 /version.py | |
parent | 23cbd581dbb79d0b319052f62995b8152cc79a0a (diff) | |
download | deluge-7d679eb4800df015c89ec9e4e7f82b815a051162.tar.gz deluge-7d679eb4800df015c89ec9e4e7f82b815a051162.tar.bz2 deluge-7d679eb4800df015c89ec9e4e7f82b815a051162.zip |
Updates to helper scripts
* Python 3 compatible
* Consistent quote symbol
Diffstat (limited to 'version.py')
-rw-r--r-- | version.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/version.py b/version.py index bce2bdbcc..fe24870e8 100644 --- a/version.py +++ b/version.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- # Authors: Douglas Creager <dcreager@dcreager.net> # Calum Lind <calumlind@gmail.com> @@ -41,7 +42,7 @@ def call_git_describe(prefix="", suffix=""): cmd = "git describe --tags --match %s[0-9]*" % prefix try: output = Popen(cmd.split(), stdout=PIPE, stderr=PIPE).communicate() - version = output[0].strip().replace(prefix, "") + version = output[0].decode("utf-8").strip().replace(prefix, "") if "-" in version: version = ".dev".join(version.replace(suffix, "").split("-")[:2]) return version @@ -70,4 +71,4 @@ def get_version(prefix="", suffix=""): return version if __name__ == "__main__": - print get_version(prefix="deluge-", suffix=".dev0") + print(get_version(prefix="deluge-", suffix=".dev0")) |