Port to six

This commit is contained in:
Aniket21mathur 2019-07-13 14:45:12 +05:30 committed by James Cameron
parent 3b28597486
commit ed46c219a9
3 changed files with 3 additions and 3 deletions

View File

@ -1503,7 +1503,7 @@ class _ClientHandler(dbus.service.Object):
def GetAll(self, interface_name):
if interface_name in self._prop_getters:
r = {}
for k, v in self._prop_getters[interface_name].items():
for k, v in list(self._prop_getters[interface_name].items()):
r[k] = v()
return r
else:

View File

@ -88,7 +88,7 @@ class DSMetadata(GObject.GObject):
self._properties = {}
else:
if six.PY3:
for x, y in properties.items():
for x, y in list(properties.items()):
try:
properties[x] = y.decode()
except BaseException:

View File

@ -208,7 +208,7 @@ class LRU:
return iter(self.d)
def itervalues(self):
for i_, j in self.iteritems():
for i_, j in six.iteritems(self):
yield j
def keys(self):