summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Pull.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-01-10 18:31:28 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-01-10 18:31:28 +0000
commit4bb58ec3525ac58b9cda6f42df1a46af25361b92 (patch)
treeb86eeba184da4eb77fc73ef1459bfb338946b359 /src/lib/Server/Admin/Pull.py
parente5a25e5f5170ba06d5482877b57df132d0df465f (diff)
downloadbcfg2-4bb58ec3525ac58b9cda6f42df1a46af25361b92.tar.gz
bcfg2-4bb58ec3525ac58b9cda6f42df1a46af25361b92.tar.bz2
bcfg2-4bb58ec3525ac58b9cda6f42df1a46af25361b92.zip
Finish up PullSource plugin work
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5010 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin/Pull.py')
-rw-r--r--src/lib/Server/Admin/Pull.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Pull.py b/src/lib/Server/Admin/Pull.py
index ecf86787e..60f528c1d 100644
--- a/src/lib/Server/Admin/Pull.py
+++ b/src/lib/Server/Admin/Pull.py
@@ -96,8 +96,11 @@ class Pull(Bcfg2.Server.Admin.MetadataCore):
ename in gen.Entries.get(etype, {})]
if len(glist) != 1:
self.errExit("Got wrong numbers of matching generators for entry:" \
- + "%s" % ([g.__name__ for g in glist]))
+ + "%s" % ([g.name for g in glist]))
plugin = glist[0]
+ if not isinstance(plugin, Bcfg2.Server.Plugin.PullSource):
+ self.errExit("Configuration upload not supported by plugin %s" \
+ % (plugin.name))
try:
choices = plugin.AcceptChoices(new_entry, meta)
specific = self.Choose(choices)
@@ -105,5 +108,5 @@ class Pull(Bcfg2.Server.Admin.MetadataCore):
plugin.AcceptPullData(specific, new_entry, self.log)
except Bcfg2.Server.Plugin.PluginExecutionError:
self.errExit("Configuration upload not supported by plugin %s" \
- % (plugin.__name__))
+ % (plugin.name))
# FIXME svn commit if running under svn