Fix up messing around with lists, sets and frozen sets
authorFabian Groffen <grobian@gentoo.org>
Sun, 28 Sep 2008 12:13:55 +0000 (12:13 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 28 Sep 2008 12:13:55 +0000 (12:13 -0000)
svn path=/main/branches/prefix/; revision=11579

pym/portage/__init__.py

index 175f00e8f7f5866212cb470bab73d5283709c3e3..a24220cc2263d943d4c42d20cbf2f05e4afe6882 100644 (file)
@@ -4621,9 +4621,9 @@ def eapi_is_supported(eapi):
        eapi = str(eapi).split() # note Python's contact for this special case
 
        # these are the properties that MUST be present (should)
-       properties = []
+       properties = set()
        if portage.const.EAPIPREFIX:
-               properties.append(portage.const.EAPIPREFIX) # clumpsy temporary solution
+               properties.add(portage.const.EAPIPREFIX) # clumpsy temporary solution
 
        for prop in properties:
                if prop not in eapi:
@@ -4632,9 +4632,9 @@ def eapi_is_supported(eapi):
                        eapi.remove(prop)
        
        # now check if what's left is supported (can)
-       properties = _deprecated_eapis[:] # another clumpsy solution
+       properties = set(_deprecated_eapis) # another clumpsy solution
        for i in range(portage.const.EAPI + 1):
-               properties.append(str(i))
+               properties.add(str(i))
 
        for v in eapi:
                if v not in properties: