New attribute autoconnect in server tag

This commit is contained in:
Némunaire 2012-06-29 01:02:15 +02:00
commit 22348e53b5
2 changed files with 11 additions and 0 deletions

View file

@ -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)