Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2020-09-02 09:05:44 +0300
committerRobert Adam <dev@robert-adam.de>2020-09-02 09:11:28 +0300
commit756a35e334257f6fe4d17c65d1e02093464b4291 (patch)
tree554acd573dad57ae60f540d053873df69d5c4933 /scripts
parent0ebe6c1e51079b75de4f4bf688d032430b899eed (diff)
MAINT(mumble-version.py): Fix indentation
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mumble-version.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/scripts/mumble-version.py b/scripts/mumble-version.py
index 8f23aa035..90e94d268 100755
--- a/scripts/mumble-version.py
+++ b/scripts/mumble-version.py
@@ -63,41 +63,41 @@ import subprocess
import sys
def strip(s):
- s = s.replace('\r', '')
- s = s.replace('\n', '')
- return s
+ s = s.replace('\r', '')
+ s = s.replace('\n', '')
+ return s
def cmd(args):
- shell = platform.system() == 'Windows'
- p = subprocess.Popen(args, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = p.communicate()
- if p.returncode != 0:
- raise Exception('cmd: {0} failed with status {1}: {2}'.format(args, p.returncode, stderr))
- return stdout.decode('utf-8')
+ shell = platform.system() == 'Windows'
+ p = subprocess.Popen(args, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ raise Exception('cmd: {0} failed with status {1}: {2}'.format(args, p.returncode, stderr))
+ return stdout.decode('utf-8')
# Reads the version from src/mumble.pri
def readMumblePriVersion():
- sourceTreeRoot = strip(cmd(['git', 'rev-parse', '--show-toplevel']))
+ sourceTreeRoot = strip(cmd(['git', 'rev-parse', '--show-toplevel']))
- version = None
- with open(os.path.join(sourceTreeRoot, 'src', 'mumble.pri'), 'r') as f:
- for line in f:
- if 'VERSION' in line:
- line = line.replace('VERSION', '')
- line = line.replace('=', '')
- line = line.replace('\t', '')
- line = line.replace(' ', '')
- line = strip(line)
- version = line
- break
- if version is None:
- raise Exception('unable to read version from mumble.pri')
- return version
+ version = None
+ with open(os.path.join(sourceTreeRoot, 'src', 'mumble.pri'), 'r') as f:
+ for line in f:
+ if 'VERSION' in line:
+ line = line.replace('VERSION', '')
+ line = line.replace('=', '')
+ line = line.replace('\t', '')
+ line = line.replace(' ', '')
+ line = strip(line)
+ version = line
+ break
+ if version is None:
+ raise Exception('unable to read version from mumble.pri')
+ return version
def main():
# Get all tags associated with the latest commit
latestCommitTags = [x for x in cmd(['git', 'tag', '--points-at', 'HEAD']).split("\n") if x]
-
+
if len(latestCommitTags) > 1:
raise RuntimeError("Encountered commit with multiple tags: %s" % latestCommitTags)
@@ -123,8 +123,8 @@ def main():
end = ''
if '--newline' in sys.argv:
- end = None
+ end = None
print(version, end=end)
if __name__ == '__main__':
- main()
+ main()