Fix "NameError: global name 'basestring' is not defined" with Python 3.
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:57:38 +0000 (20:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:57:38 +0000 (20:57 -0000)
(trunk r15428)

svn path=/main/branches/2.1.7/; revision=15650

pym/portage/package/ebuild/config.py

index ab7b7a2a57a4a259e1ef7d805c038d2ae6ac1b95..699521639128bf82803e21053e27315944827b7f 100644 (file)
@@ -45,6 +45,9 @@ from portage.util import ensure_dirs, getconfig, grabdict, \
        writemsg, writemsg_level
 from portage.versions import catpkgsplit, catsplit, cpv_getkey
 
+if sys.hexversion >= 0x3000000:
+       basestring = str
+
 def autouse(myvartree, use_cache=1, mysettings=None):
        """
        autuse returns a list of USE variables auto-enabled to packages being installed