inspection: rename variable for OS type

'type' is ambiguous as name, it might conflict with the Python builtin.
Instead, rename it to 'os_type' to get rid of the issue altogether.
This commit is contained in:
Pino Toscano 2017-02-08 16:55:33 +01:00 committed by Cole Robinson
parent 2df8dc39e8
commit f7a726dc70
2 changed files with 4 additions and 4 deletions

View File

@ -149,7 +149,7 @@ def start_job_progress_thread(vm, meter, progtext):
class vmmInspectionData(object):
def __init__(self):
self.type = None
self.os_type = None
self.distro = None
self.major_version = None
self.minor_version = None

View File

@ -179,7 +179,7 @@ class vmmInspection(vmmGObject):
root = roots[0]
# Inspection results.
typ = g.inspect_get_type(root) # eg. "linux"
os_type = g.inspect_get_type(root) # eg. "linux"
distro = g.inspect_get_distro(root) # eg. "fedora"
major_version = g.inspect_get_major_version(root) # eg. 14
minor_version = g.inspect_get_minor_version(root) # eg. 0
@ -236,7 +236,7 @@ class vmmInspection(vmmGObject):
# Log what we found.
logging.debug("%s: detected operating system: %s %s %d.%d (%s)",
prettyvm, typ, distro, major_version, minor_version,
prettyvm, os_type, distro, major_version, minor_version,
product_name)
logging.debug("hostname: %s", hostname)
if icon:
@ -245,7 +245,7 @@ class vmmInspection(vmmGObject):
logging.debug("# apps: %d", len(apps))
data = vmmInspectionData()
data.type = str(type)
data.os_type = str(os_type)
data.distro = str(distro)
data.major_version = int(major_version)
data.minor_version = int(minor_version)