def detect_host_os(): """ Returns an instance of OperatingSystem that matches given host system :raises: NotImplementedError if host operating system is not yet supported :rtype: HostOS """ global CURRENT_OS if not CURRENT_OS: if sys.platform.startswith('linux'): from zabby.hostos.linux import Linux CURRENT_OS = Linux() else: raise NotImplementedError return CURRENT_OS
def setup(self): from zabby.hostos.linux import Linux self.linux = Linux()