Fix device indexing for python3
This commit is contained in:
parent
4a0e88a32d
commit
48d3432c9c
1 changed files with 4 additions and 1 deletions
|
@ -58,6 +58,9 @@ class FindMyiPhoneServiceManager(object):
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
if isinstance(key, int):
|
if isinstance(key, int):
|
||||||
|
if six.PY3:
|
||||||
|
key = list(self.keys())[key]
|
||||||
|
else:
|
||||||
key = self.keys()[key]
|
key = self.keys()[key]
|
||||||
return self._devices[key]
|
return self._devices[key]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue