changeset 38734:25880ddf9a86

macosx: fixing macOS version generation after db9d1dd01bf0 With the Python3 change, the string is now something like version = b'4.6.2+848-88be288e8ac1' where it was previously just: version = '4.6.2+848-88be288e8ac1' Differential Revision: https://phab.mercurial-scm.org/D3964
author Rodrigo Damazio <rdamazio@google.com>
date Wed, 18 Jul 2018 18:36:39 -0700
parents c2586a6e5884
children 8891dc15b327
files contrib/genosxversion.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/genosxversion.py	Tue Jul 10 17:01:06 2018 +0530
+++ b/contrib/genosxversion.py	Wed Jul 18 18:36:39 2018 -0700
@@ -117,9 +117,9 @@
         return
     with open(opts.versionfile) as f:
         for l in f:
-            if l.startswith('version = '):
+            if l.startswith('version = b'):
                 # version number is entire line minus the quotes
-                ver = l[len('version = ') + 1:-2]
+                ver = l[len('version = b') + 1:-2]
                 break
     if opts.paranoid:
         print(paranoidver(ver))