From: Zac Medico Date: Sat, 6 Nov 2010 22:48:40 +0000 (-0700) Subject: Atom: require string type for eapi X-Git-Tag: v2.2.0_alpha5~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d944f72f39ebcff65cfa8d97325c2052883cd606;p=portage.git Atom: require string type for eapi --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 58fded47a..7ff54f6f7 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1138,6 +1138,9 @@ class Atom(_atom_base): self.__dict__['unevaluated_atom'] = self if eapi is not None: + if not isinstance(eapi, basestring): + raise TypeError('expected eapi argument of ' + \ + '%s, got %s: %s' % (basestring, type(eapi), eapi,)) if self.slot and not eapi_has_slot_deps(eapi): raise InvalidAtom( _("Slot deps are not allowed in EAPI %s: '%s'") \