refactor tsstats.client.Client.__getitem__

This commit is contained in:
Thor77 2016-05-19 21:08:27 +02:00
parent a3397d6367
commit 8af2b761a3
3 changed files with 3 additions and 15 deletions

View File

@ -56,7 +56,7 @@ author = 'Thor77'
# The short X.Y version.
version = '0.2'
# The full version, including alpha/beta/rc tags.
release = '0.2.0'
release = '0.2.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='tsstats',
version='0.2.0',
version='0.2.1',
author='Thor77',
author_email='thor77@thor77.org',
description='A simple Teamspeak stats-generator',

View File

@ -130,16 +130,4 @@ class Client(object):
return '<{},{}>'.format(self.identifier, self.nick)
def __getitem__(self, item):
'''
DEPRECATED
'''
return {
'identifier': self.identifier,
'nick': self.nick,
'connected': self.connected,
'onlinetime': self.onlinetime,
'kicks': self.kicks,
'pkicks': self.pkicks,
'bans': self.bans,
'pbans': self.pbans,
}[item]
return self.__getattribute__(item)