From: Ant Zucaro Date: Sat, 29 Apr 2017 16:15:36 +0000 (-0400) Subject: Add categories to servers. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ba7de50d5c81722112b446df245eeaa77894619;p=xonotic%2Fxonstat.git Add categories to servers. --- diff --git a/xonstat/models/server.py b/xonstat/models/server.py index 387c2cd..5d6d7fd 100644 --- a/xonstat/models/server.py +++ b/xonstat/models/server.py @@ -12,12 +12,13 @@ class Server(FuzzyDateMixin, EpochMixin): A Xonotic server, identifiable by name and (when there's a conflict) hashkey. """ - def __init__(self, name=None, hashkey=None, ip_addr=None, elo_ind=None): + def __init__(self, name=None, hashkey=None, ip_addr=None, elo_ind=None, categories=None): self.name = name self.hashkey = hashkey self.ip_addr = ip_addr self.elo_ind = elo_ind if elo_ind is not None else True self.create_dt = dt.utcnow() + self.categories = categories def __repr__(self): return "".format(self.server_id, self.name.encode('utf-8')) @@ -28,4 +29,5 @@ class Server(FuzzyDateMixin, EpochMixin): 'name': self.name, 'ip_addr': self.ip_addr, 'location': self.location, + 'categories': self.categories, }