summaryrefslogtreecommitdiffstats
path: root/dispatch.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2005-12-01 19:27:03 +0000
committerDavid Cantrell <dcantrell@redhat.com>2005-12-01 19:27:03 +0000
commit711e47f62e5a3bd36ce6d7dacf5fd6d63c6101b3 (patch)
tree1fb4f08786da7ef04d361f63494d78248b6b1545 /dispatch.py
parentaf3400bda0f54ad7baab6312c986b33945719547 (diff)
downloadanaconda-711e47f62e5a3bd36ce6d7dacf5fd6d63c6101b3.tar.gz
anaconda-711e47f62e5a3bd36ce6d7dacf5fd6d63c6101b3.tar.xz
anaconda-711e47f62e5a3bd36ce6d7dacf5fd6d63c6101b3.zip
In Dispatch.bindArgs(), make sure the args parameter is a list or tuple
before running the for loop. When I call this method (??) from the installpackages state, args is a function.
Diffstat (limited to 'dispatch.py')
-rw-r--r--dispatch.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/dispatch.py b/dispatch.py
index c702c57ee..46433a612 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -237,14 +237,16 @@ class Dispatcher:
def bindArgs(self, args):
newArgs = ()
- for arg in args:
- obj = self
- for item in string.split(arg, '.'):
- if not obj.__dict__.has_key(item):
- exec "obj = self.%s" %(arg,)
- break
- obj = obj.__dict__[item]
- newArgs = newArgs + (obj,)
+
+ if type(args) == TupleType or type(args) == ListType:
+ for arg in args:
+ obj = self
+ for item in string.split(arg, '.'):
+ if not obj.__dict__.has_key(item):
+ exec "obj = self.%s" %(arg,)
+ break
+ obj = obj.__dict__[item]
+ newArgs = newArgs + (obj,)
return newArgs