New attribute autoconnect in server tag
This commit is contained in:
parent
5bfcd61931
commit
22348e53b5
2 changed files with 11 additions and 0 deletions
|
|
@ -58,6 +58,14 @@ class Server(threading.Thread):
|
|||
else:
|
||||
return None
|
||||
|
||||
@property
|
||||
def autoconnect(self):
|
||||
if self.node.hasAttribute("autoconnect"):
|
||||
value = self.node["autoconnect"].lower()
|
||||
return value != "no" and value != "off" and value != "false"
|
||||
else:
|
||||
return False
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self.host + ":" + str(self.port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue