diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-01-31 15:43:02 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-01-31 15:43:02 +0000 |
commit | 6737b09abbfe27aaf40b2b7642b20cac6e552094 (patch) | |
tree | 0aa2fc6de106e51532dd41f4304e755081db1dc7 /src | |
parent | 1d3719d6fbff53db8b797e29c5073921ad405667 (diff) | |
download | bcfg2-6737b09abbfe27aaf40b2b7642b20cac6e552094.tar.gz bcfg2-6737b09abbfe27aaf40b2b7642b20cac6e552094.tar.bz2 bcfg2-6737b09abbfe27aaf40b2b7642b20cac6e552094.zip |
Unescape xml escape sequences (Resolves Ticket #384)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2736 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2-admin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index b13153d71..326109bea 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -2,6 +2,7 @@ '''bcfg2-admin is a script that helps to administrate a bcfg2 deployment''' import difflib, logging, lxml.etree, os, popen2, re, socket, sys, ConfigParser +import xml.sax.saxutils import Bcfg2.Server.Core, Bcfg2.Logging log = logging.getLogger('bcfg-admin') @@ -139,7 +140,7 @@ def initialize_repo(): def update_file(path, diff): '''Update file at path using diff''' - newdata = '\n'.join(difflib.restore(diff.split('\n'), 1)) + newdata = '\n'.join(difflib.restore(xml.sax.saxutils.unescape(diff).split('\n'), 1)) print "writing file, %s" % path open(path, 'w').write(newdata) |