mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
osdict: add "macos" type
Give macOS OSes an own type, so they have their own entry in the list of OS types.
This commit is contained in:
committed by
Cole Robinson
parent
fa9ee6cd94
commit
7866cfec1b
@@ -978,6 +978,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
"bsd": _("BSD"),
|
||||
"generic": _("Generic"),
|
||||
"linux": _("Linux"),
|
||||
"macos": _("macOS"),
|
||||
"other": _("Others"),
|
||||
"solaris": _("Solaris"),
|
||||
"windows": _("Windows"),
|
||||
|
||||
@@ -244,7 +244,7 @@ class _OSDB(object):
|
||||
return osname
|
||||
|
||||
def list_types(self):
|
||||
approved_types = ["linux", "windows", "bsd",
|
||||
approved_types = ["linux", "windows", "bsd", "macos",
|
||||
"solaris", "other", "generic"]
|
||||
return approved_types
|
||||
|
||||
@@ -423,6 +423,9 @@ class _OsVariant(object):
|
||||
if self._family in ['openbsd', 'freebsd', 'netbsd']:
|
||||
return "bsd"
|
||||
|
||||
if self._family in ['darwin']:
|
||||
return "macos"
|
||||
|
||||
return "other"
|
||||
|
||||
def is_windows(self):
|
||||
|
||||
Reference in New Issue
Block a user