All pastes #537191 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-04 17:40 UTC
rendered paste body
  def get_inherited_clues(self, srcpkg, verbosity):
        #FIXME: Thanks Matthias Klose: fix endless recursion!
        inheritlist = set()
        srcpkginfo = self.get_info_file(srcpkg, verbosity)
        if verbosity > 0:
            verbosity -= 1
            if srcpkginfo.inherits:
                for inherit in srcpkginfo.inherits:
                    inheritobj = self.get_info_file(inherit, verbosity)
                    if inheritobj:
                        inheritlist.update(inheritobj.clues)
                        inheritlist.update(self.get_inherited_clues(inheritobj.srcpkg, \
                                                                    verbosity))
            else:
                inheritlist.update(set(self.get_info_file(srcpkg,
                                                          verbosity).clues))
        return inheritlist