DiskImage : alphabetise entries
This is a no-op refactor to just keep the fields in alphabetical order. This makes it much easier to visually keep the initalizer and comparision functions in sync across any future changes that may update the fields. Note name is kept first, out of order, to signal it is a primary key (see next follow-on I3931dc1457c023154cde0df2bb7b0a41cc6f20d3 where this is enforced) Change-Id: I0c177b3b0edee3cd811c029d3f03a08c9e11a5fb
This commit is contained in:
parent
a0e542d4ff
commit
9f1a074ae8
|
@ -173,30 +173,30 @@ class Label(ConfigValue):
|
|||
class DiskImage(ConfigValue):
|
||||
def __init__(self):
|
||||
self.name = None
|
||||
self.elements = None
|
||||
self.build_timeout = None
|
||||
self.dib_cmd = None
|
||||
self.release = None
|
||||
self.rebuild_age = None
|
||||
self.elements = None
|
||||
self.env_vars = None
|
||||
self.image_types = None
|
||||
self.pause = False
|
||||
self.username = None
|
||||
self.python_path = None
|
||||
self.build_timeout = None
|
||||
self.rebuild_age = None
|
||||
self.release = None
|
||||
self.username = None
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, DiskImage):
|
||||
return (other.name == self.name and
|
||||
other.elements == self.elements and
|
||||
other.build_timeout == self.build_timeout and
|
||||
other.dib_cmd == self.dib_cmd and
|
||||
other.release == self.release and
|
||||
other.rebuild_age == self.rebuild_age and
|
||||
other.elements == self.elements and
|
||||
other.env_vars == self.env_vars and
|
||||
other.image_types == self.image_types and
|
||||
other.pause == self.pause and
|
||||
other.username == self.username and
|
||||
other.python_path == self.python_path and
|
||||
other.build_timeout == self.build_timeout)
|
||||
other.rebuild_age == self.rebuild_age and
|
||||
other.release == self.release and
|
||||
other.username == self.username)
|
||||
return False
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in New Issue