slot_collision.py: Define basestring for python3.
authorMao PU <mao.c.pu@googlemail.com>
Sun, 17 Oct 2010 18:19:55 +0000 (11:19 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Oct 2010 18:19:55 +0000 (11:19 -0700)
pym/_emerge/resolver/slot_collision.py

index f6cf94d916692afd28c3f011ae713ae2b94f85d6..347f569e97f0fa6693dbb6082d1a4d2dfe997072 100644 (file)
@@ -3,6 +3,8 @@
 
 from __future__ import print_function
 
+import sys
+
 from _emerge.AtomArg import AtomArg
 from _emerge.Package import Package
 from _emerge.PackageArg import PackageArg
@@ -12,6 +14,9 @@ from portage._sets.base import InternalPackageSet
 from portage.util import writemsg
 from portage.versions import cpv_getversion, vercmp
 
+if sys.hexversion >= 0x3000000:
+       basestring = str
+
 class slot_conflict_handler(object):
        """This class keeps track of all slot conflicts and provides
        an interface to get possible solutions.