Fixed Issue #77 Teamspeak3 Manger errors prevent run_databaseUpdate from completing

Wrapped _sync_ts_group_db in a try/catch block until we abstract services into their own apps
This commit is contained in:
Adarnof 2015-11-07 05:33:46 +00:00
parent b7327a34d0
commit 1cc3b2a6b7

View File

@ -115,6 +115,7 @@ class Teamspeak3Manager:
@staticmethod @staticmethod
def _sync_ts_group_db(): def _sync_ts_group_db():
try:
remote_groups = Teamspeak3Manager._group_list() remote_groups = Teamspeak3Manager._group_list()
local_groups = TSgroup.objects.all() local_groups = TSgroup.objects.all()
for key in remote_groups: for key in remote_groups:
@ -128,6 +129,8 @@ class Teamspeak3Manager:
q = TSgroup.objects.filter(ts_group_id=g.ts_group_id) q = TSgroup.objects.filter(ts_group_id=g.ts_group_id)
if not q: if not q:
g.save() g.save()
except:
pass
@staticmethod @staticmethod
def add_user(username, corp_ticker): def add_user(username, corp_ticker):