[entropy.client] python 3.x fixes

This commit is contained in:
Fabio Erculiani
2011-09-06 23:26:08 +02:00
parent a54437ff13
commit 70bc63ebf9
2 changed files with 2 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ class RepositoryMixin:
@type mask_clear: bool
"""
repo_cache = getattr(self, "_repodb_cache", {})
for item, val in repo_cache.items():
for item, val in list(repo_cache.items()): # list() -> python3 support
repository_id, root = item
# in-memory repositories cannot be closed
# otherwise everything will be lost, to

View File

@@ -444,7 +444,7 @@ class Trigger:
entropy_sh = const_convert_to_rawstring(entropy_sh)
tmp_fd, tmp_path = tempfile.mkstemp()
with os.fdopen(tmp_fd, "ab+") as tr_f:
tr_f.write(self._pkgdata['trigger'])
tr_f.write(const_convert_to_rawstring(self._pkgdata['trigger']))
tr_f.flush()
tr_f.seek(0)
interpreter = tr_f.read(128)