diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-01-18 13:33:08 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-01-18 13:36:47 -0800 |
commit | 71235479ab208318dff391420f9695f5cfaa9594 (patch) | |
tree | d36bc22802e3b13c8ca5dce4328540a287c6eb3f /pym/portage/dep/dep_check.py | |
parent | 0d732def5d30b29ab2941f0c66919a3ec4e8eb02 (diff) | |
download | portage-71235479ab208318dff391420f9695f5cfaa9594.tar.gz portage-71235479ab208318dff391420f9695f5cfaa9594.tar.bz2 portage-71235479ab208318dff391420f9695f5cfaa9594.zip |
Use unicode_literals more.
This helps to ensure consistent results, regardless of whether we're
using Python 2 or Python 3.
Diffstat (limited to 'pym/portage/dep/dep_check.py')
-rw-r--r-- | pym/portage/dep/dep_check.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/portage/dep/dep_check.py b/pym/portage/dep/dep_check.py index b5f8d0d7e..6e3d0865a 100644 --- a/pym/portage/dep/dep_check.py +++ b/pym/portage/dep/dep_check.py @@ -1,12 +1,13 @@ -# Copyright 2010-2012 Gentoo Foundation +# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from __future__ import unicode_literals + __all__ = ['dep_check', 'dep_eval', 'dep_wordreduce', 'dep_zapdeps'] import logging import portage -from portage import _unicode_decode from portage.dep import Atom, match_from_list, use_reduce from portage.exception import InvalidDependString, ParseError from portage.localization import _ @@ -183,7 +184,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", del mytrees["virt_parent"] if not mycheck[0]: - raise ParseError(_unicode_decode("%s: %s '%s'") % \ + raise ParseError("%s: %s '%s'" % \ (pkg, mycheck[1], depstring)) # pull in the new-style virtual @@ -605,7 +606,7 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, masklist=mymasks, matchall=(use=="all"), excludeall=useforce, opconvert=True, token_class=Atom, eapi=eapi) except InvalidDependString as e: - return [0, _unicode_decode("%s") % (e,)] + return [0, "%s" % (e,)] if mysplit == []: #dependencies were reduced to nothing @@ -619,7 +620,7 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, use_force=useforce, use_mask=mymasks, use_cache=use_cache, use_binaries=use_binaries, myroot=myroot, trees=trees) except ParseError as e: - return [0, _unicode_decode("%s") % (e,)] + return [0, "%s" % (e,)] mysplit2=mysplit[:] mysplit2=dep_wordreduce(mysplit2,mysettings,mydbapi,mode,use_cache=use_cache) |