From 2ba7de50d5c81722112b446df245eeaa77894619 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 29 Apr 2017 12:15:36 -0400 Subject: [PATCH] Add categories to servers. --- xonstat/models/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, } -- 2.39.2