diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Tools/Scripts/webkitpy/common/system/platforminfo.py | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Tools/Scripts/webkitpy/common/system/platforminfo.py')
-rw-r--r-- | Tools/Scripts/webkitpy/common/system/platforminfo.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo.py b/Tools/Scripts/webkitpy/common/system/platforminfo.py index dd6d6844c..22cafbbee 100644 --- a/Tools/Scripts/webkitpy/common/system/platforminfo.py +++ b/Tools/Scripts/webkitpy/common/system/platforminfo.py @@ -48,6 +48,8 @@ class PlatformInfo(object): self.os_name = self._determine_os_name(sys_module.platform) if self.os_name == 'linux': self.os_version = self._determine_linux_version() + if self.os_name == 'freebsd': + self.os_version = platform_module.release() if self.os_name.startswith('mac'): self.os_version = self._determine_mac_version(platform_module.mac_ver()[0]) if self.os_name.startswith('win'): @@ -62,6 +64,9 @@ class PlatformInfo(object): def is_linux(self): return self.os_name == 'linux' + def is_freebsd(self): + return self.os_name == 'freebsd' + def display_name(self): # platform.platform() returns Darwin information for Mac, which is just confusing. if self.is_mac(): @@ -93,6 +98,8 @@ class PlatformInfo(object): return 'linux' if sys_platform in ('win32', 'cygwin'): return 'win' + if sys_platform.startswith('freebsd'): + return 'freebsd' raise AssertionError('unrecognized platform string "%s"' % sys_platform) def _determine_mac_version(self, mac_version_string): |