Resolved an issue related Python 3.x compability regarding setting
property name was same as variable.pull/3/head
parent
d753374977
commit
e52fd0d349
|
@ -25,8 +25,8 @@ class ServerType:
|
||||||
|
|
||||||
def __init__(self, server_type, description, priority):
|
def __init__(self, server_type, description, priority):
|
||||||
self.stype = server_type
|
self.stype = server_type
|
||||||
self.description = description
|
self.desc = description
|
||||||
self.priority = priority
|
self.spriority = priority
|
||||||
|
|
||||||
assert(server_type not in ServerType.registry)
|
assert(server_type not in ServerType.registry)
|
||||||
ServerType.registry[server_type] = self
|
ServerType.registry[server_type] = self
|
||||||
|
@ -37,15 +37,15 @@ class ServerType:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self):
|
def description(self):
|
||||||
return self.description
|
return self.desc
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def priority(self):
|
def priority(self):
|
||||||
return self.priority
|
return self.spriority
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Type: {0}, Description:{1}, Priority: {2}".format(
|
return "Type: {0}, Description:{1}, Priority: {2}".format(
|
||||||
self.stype, self.description, self.priority
|
self.stype, self.desc, self.spriority
|
||||||
)
|
)
|
||||||
|
|
||||||
def instanceOf(self, version):
|
def instanceOf(self, version):
|
||||||
|
|
Loading…
Reference in New Issue