From d944f72f39ebcff65cfa8d97325c2052883cd606 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Nov 2010 15:48:40 -0700 Subject: [PATCH] Atom: require string type for eapi --- pym/portage/dep/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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'") \ -- 2.26.2