summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-admin9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin
index 05c51c3bc..d1bfff7b5 100755
--- a/src/sbin/bcfg2-admin
+++ b/src/sbin/bcfg2-admin
@@ -3,7 +3,7 @@
import getopt, difflib, logging, lxml.etree, os, popen2, re, socket, sys, ConfigParser
import Bcfg2.Server.Core, Bcfg2.Logging, Bcfg2.tlslite.api
-import xml.sax.saxutils
+import xml.sax.saxutils, binascii
log = logging.getLogger('bcfg-admin')
@@ -313,7 +313,10 @@ def do_pull(cfile, repopath, client, etype, ename):
if not entry:
err_exit("Could not find state data for entry; rerun bcfg2 on client system")
- diff = entry[0].get('current_diff')
+ if 'current_bdiff' in entry[0].attrib:
+ diff = binascii.a2b_base64(entry[0].get('current_bdiff'))
+ else:
+ diff = entry[0].get('current_diff')
try:
bcore = Bcfg2.Server.Core.Core({}, cfile)
@@ -331,6 +334,8 @@ def do_pull(cfile, repopath, client, etype, ename):
err_exit("Got wrong numbers of matching generators for entry:" \
+ "%s" % ([g.__name__ for g in glist]))
plugin = glist[0]
+ if diff == None:
+ err_exit("Failed to locate diff\nStatistics entry was:\n%s" % lxml.etree.tostring(entry[0]))
try:
plugin.AcceptEntry(m, 'ConfigFile', ename, diff)
except Bcfg2.Server.Plugin.PluginExecutionError: