From: Zac Medico Date: Thu, 19 Aug 2010 08:54:16 +0000 (-0700) Subject: Raise ValueError if fromlist contains an extra comma. X-Git-Tag: v2.2_rc68~79 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c0cae31b23a34fb1aabc3f1df0e1f8b69867760;p=portage.git Raise ValueError if fromlist contains an extra comma. --- diff --git a/pym/portage/proxy/lazyimport.py b/pym/portage/proxy/lazyimport.py index d878b7adc..ad4a54271 100644 --- a/pym/portage/proxy/lazyimport.py +++ b/pym/portage/proxy/lazyimport.py @@ -189,6 +189,9 @@ def lazyimport(scope, *args): already_imported = modules.get(name) fromlist = fromlist.split(',') for s in fromlist: + if not s: + # This happens if there's an extra comma in fromlist. + raise ValueError('Empty module attribute name') alias = s.split('@', 1) if len(alias) == 1: alias = alias[0]