Fix device indexing for python3

This commit is contained in:
Evgeny Tataurov 2014-01-26 13:25:07 +06:00
parent 4a0e88a32d
commit 48d3432c9c

View file

@ -58,7 +58,10 @@ class FindMyiPhoneServiceManager(object):
def __getitem__(self, key):
if isinstance(key, int):
key = self.keys()[key]
if six.PY3:
key = list(self.keys())[key]
else:
key = self.keys()[key]
return self._devices[key]
def __getattr__(self, attr):