Merge pull request #16 from etataurov/py3keysindexing
Devices indexing doesn't work on python3
This commit is contained in:
commit
d86efc04b1
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ class FindMyiPhoneServiceManager(object):
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
if isinstance(key, int):
|
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]
|
return self._devices[key]
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
|
|
Loading…
Reference in a new issue