blob: 0105e9bc67fa1ad556c81d066f8dde57d2414b9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# Copyright: 2005 Gentoo Foundation
# Author(s): Brian Harring (ferringb@gentoo.org)
# License: GPL2
# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/util/inheritance.py,v 1.1 2005/08/05 04:42:41 ferringb Exp $
def check_for_base(obj, allowed):
"""Look through __class__ to see if any of the allowed classes are found, returning the first allowed found"""
for x in allowed:
if issubclass(obj.__class__, x):
return x
return None
|