From fe1266e02a79cda1753e9265a0d04a0886d3758e Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Fri, 31 Oct 2014 17:04:16 -0700 Subject: [PATCH] Change from indexerror to stopiteration --- salt/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/loader.py b/salt/loader.py index f8040b33a4..c594447e34 100644 --- a/salt/loader.py +++ b/salt/loader.py @@ -704,7 +704,7 @@ class Loader(object): context = sys.modules[ functions[functions.iterkeys().next()].__module__ ].__context__ - except (AttributeError, IndexError): + except (AttributeError, StopIteration): context = {} mod.__context__ = context return funcs