Port to six
This commit is contained in:
parent
3b28597486
commit
ed46c219a9
@ -1503,7 +1503,7 @@ class _ClientHandler(dbus.service.Object):
|
|||||||
def GetAll(self, interface_name):
|
def GetAll(self, interface_name):
|
||||||
if interface_name in self._prop_getters:
|
if interface_name in self._prop_getters:
|
||||||
r = {}
|
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()
|
r[k] = v()
|
||||||
return r
|
return r
|
||||||
else:
|
else:
|
||||||
|
@ -88,7 +88,7 @@ class DSMetadata(GObject.GObject):
|
|||||||
self._properties = {}
|
self._properties = {}
|
||||||
else:
|
else:
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
for x, y in properties.items():
|
for x, y in list(properties.items()):
|
||||||
try:
|
try:
|
||||||
properties[x] = y.decode()
|
properties[x] = y.decode()
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
@ -208,7 +208,7 @@ class LRU:
|
|||||||
return iter(self.d)
|
return iter(self.d)
|
||||||
|
|
||||||
def itervalues(self):
|
def itervalues(self):
|
||||||
for i_, j in self.iteritems():
|
for i_, j in six.iteritems(self):
|
||||||
yield j
|
yield j
|
||||||
|
|
||||||
def keys(self):
|
def keys(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user