def is_osx(self): """Indicate whether the system is Apple OSX based.""" if not self.platform_info['dist']: raise errors.UndeterminedPlatform( 'Unable to determine whether the system is OS X based.') return (self.platform_info['dist'].lower() in ['darwin', 'macosx'])
def is_debian(self): """Indicate whether the system is Debian based. Uses the platform_info property. """ if not self.platform_info['dist']: raise errors.UndeterminedPlatform( 'Unable to determine whether the system is Debian based.') return self.platform_info['dist'].lower() in ['debian', 'ubuntu']
def is_windows(self): """Indicate whether the system is Windows based.""" if hasattr(self, '_client'): if isinstance(self._client, pse.PSE): return True if not self.platform_info['dist']: raise errors.UndeterminedPlatform( 'Unable to determine whether the system is Windows based.') return self.platform_info['dist'].startswith('win')
def is_fedora(self): """Indicate whether the system in Fedora based. Uses the platform info property. """ if not self.platform_info['dist']: raise errors.UndeterminedPlatform( 'Unable to determine whether the system is Fedora based.') return (self.platform_info['dist'].lower() in ['redhat', 'centos', 'fedora', 'el'])