Use numeric strings in the OS version dictionary
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Oct 2013 21:46:57 +0000 (21:46 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Oct 2013 21:46:57 +0000 (21:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122300

Reviewed by Mark Rowe.

* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._determine_mac_version):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/system/platforminfo.py

index bf95d47..316b2ac 100644 (file)
@@ -1,3 +1,13 @@
+2013-10-03  Anders Carlsson  <andersca@apple.com>
+
+        Use numeric strings in the OS version dictionary
+        https://bugs.webkit.org/show_bug.cgi?id=122300
+
+        Reviewed by Mark Rowe.
+
+        * Scripts/webkitpy/common/system/platforminfo.py:
+        (PlatformInfo._determine_mac_version):
+
 2013-10-03  Alexey Proskuryakov  <ap@apple.com>
 
         Fix LeaksViewer to load leaks results from MountainLion, not Lion.
index 582e199..3f2683b 100644 (file)
@@ -124,12 +124,12 @@ class PlatformInfo(object):
         raise AssertionError('unrecognized platform string "%s"' % sys_platform)
 
     def _determine_mac_version(self, mac_version_string):
-        release_version = mac_version_string.split('.')[1]
+        release_version = int(mac_version_string.split('.')[1])
         version_strings = {
-            '5': 'leopard',
-            '6': 'snowleopard',
-            '7': 'lion',
-            '8': 'mountainlion',
+            5: 'leopard',
+            6: 'snowleopard',
+            7: 'lion',
+            8: 'mountainlion',
         }
         assert release_version >= min(version_strings.keys())
         return version_strings.get(release_version, 'future')