From e9a04922c144b267534e3335d2ff3d7bb8994b80 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 18 Jan 2013 15:05:42 -0800 Subject: Add workaround for Python 2.6.4 issue 4978 Avoid "TypeError: keywords must be strings" issue triggered by unicode_literals: http://bugs.python.org/issue4978 --- pym/portage/dbapi/porttree.py | 4 ++-- pym/portage/dbapi/vartree.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pym/portage/dbapi') diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 321b6758a..e21e53ce6 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -155,10 +155,10 @@ class portdbapi(dbapi): # portage group. depcachedir_unshared = True else: - cache_kwargs.update({ + cache_kwargs.update(portage._native_kwargs({ 'gid' : portage_gid, 'perms' : 0o664 - }) + })) # If secpass < 1, we don't want to write to the cache # since then we won't be able to apply group permissions diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 30add8a89..20a114bda 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -4837,7 +4837,8 @@ class dblink(object): else: kwargs['mode'] = 'w' kwargs['encoding'] = _encodings['repo.content'] - write_atomic(os.path.join(self.dbdir, fname), data, **kwargs) + write_atomic(os.path.join(self.dbdir, fname), data, + **portage._native_kwargs(kwargs)) def getelements(self,ename): if not os.path.exists(self.dbdir+"/"+ename): -- cgit v1.2.3-1-g7c22