Make all the classes inherit from object.
authorZac Medico <zmedico@gentoo.org>
Wed, 20 Jun 2007 07:11:52 +0000 (07:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 Jun 2007 07:11:52 +0000 (07:11 -0000)
svn path=/main/trunk/; revision=6886

pym/emerge/__init__.py
pym/portage/__init__.py
pym/portage/eclass_cache.py
pym/portage/gpg.py
pym/portage/output.py
pym/portage/xpak.py

index bf6dd5a361fc23a02459cbf68f8ce420b65ac32c..5f0611c43bced03b4a9c7b598dc9f3b7a7385d15 100644 (file)
@@ -362,7 +362,7 @@ def create_depgraph_params(myopts, myaction):
        return myparams
 
 # search functionality
-class search:
+class search(object):
 
        #
        # class constants
@@ -910,7 +910,7 @@ def show_invalid_depstring_notice(parent_node, depstring, error_msg):
                f.add_flowing_data(x)
        f.end_paragraph(1)
 
-class depgraph:
+class depgraph(object):
 
        pkg_tree_map = {
                "ebuild":"porttree",
index f5a4893c1215f7b524d55e18c2a1a2e51357c728..d80a72d516ddd5749032493f856bdf70c957e786 100644 (file)
@@ -316,7 +316,7 @@ def flatten(mytokens):
 
 #beautiful directed graph object
 
-class digraph:
+class digraph(object):
        def __init__(self):
                """Create an empty digraph"""
                
@@ -818,10 +818,10 @@ def autouse(myvartree, use_cache=1, mysettings=None):
        return myusevars
 
 def check_config_instance(test):
-       if not test or (str(test.__class__) != 'portage.config'):
-               raise TypeError, "Invalid type for config object: %s" % test.__class__
+       if not isinstance(test, config):
+               raise TypeError("Invalid type for config object: %s" % test.__class__)
 
-class config:
+class config(object):
        """
        This class encompasses the main portage configuration.  Data is pulled from
        ROOT/PORTDIR/profiles/, from ROOT/etc/make.profile incrementally through all 
index 40d4e360f46f6936cde2d4f674332198ae70ae33..5a0d3c3ad0d2a48ce653b827e96d71dbc8274fbf 100644 (file)
@@ -7,7 +7,7 @@ from portage.util import normalize_path, writemsg
 import os, sys
 from portage.data import portage_gid
 
-class cache:
+class cache(object):
        """
        Maintains the cache information about eclasses used in ebuild.
        """
index 93335e11b2438678d280cc0dd3c031583d5b82de..1fdac62529d3ad70e75af9bb82fb71e359f640e5 100644 (file)
@@ -30,7 +30,7 @@ def fileStats(filepath):
        return mya
 
 
-class FileChecker:
+class FileChecker(object):
        def __init__(self,keydir=None,keyring=None,requireSignedRing=False,minimumTrust=EXISTS):
                self.minimumTrust     = TRUSTED  # Default we require trust. For rings.
                self.keydir           = None
index 78d0dcfd263824add827e18fff4fae3b6de57607..847e5627a5e30ca23f7d9f3b7b0f417d67173725 100644 (file)
@@ -286,7 +286,7 @@ def set_term_size(lines, columns, fd):
        cmd = ["stty", "rows", str(lines), "columns", str(columns)]
        spawn(cmd, env=os.environ, fd_pipes={0:fd})
 
-class EOutput:
+class EOutput(object):
        """
        Performs fancy terminal formatting for status and informational messages.
 
index b7ef582e87c6db56b584f8bca81c9dc007320e5a..2a015571cb93956002313a5af67264cd862dda61 100644 (file)
@@ -224,7 +224,7 @@ def xpand(myid,mydest):
                startpos=startpos+namelen+12
        os.chdir(origdir)
 
-class tbz2:
+class tbz2(object):
        def __init__(self,myfile):
                self.file=myfile
                self.filestat=None