version.py: fix support for Python < 3.9
authorKirill Isakov <bootctl@gmail.com>
Sat, 4 Jun 2022 12:34:34 +0000 (18:34 +0600)
committerKirill Isakov <bootctl@gmail.com>
Sat, 4 Jun 2022 12:35:09 +0000 (18:35 +0600)
version.py

index 85f3b71..5617cae 100755 (executable)
@@ -20,5 +20,5 @@ cmd = [
 ]
 
 result = subp.run(cmd, stdout=subp.PIPE, encoding="utf-8", check=True)
-version = result.stdout.strip().removeprefix("release-")
+version = result.stdout.strip().replace("release-", "", 1)
 print(version)