diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-08-01 14:35:49 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-08-01 14:35:49 +0000 |
commit | dac88b71a1ea84f844a90925de8e479f270f9982 (patch) | |
tree | bafa61a5b2fd0c084926b846ef3ae3d31a860090 /src/lib/Server/Plugins/Cfg.py | |
parent | 867b093e26069de43268e424dc673d1242f6380d (diff) | |
download | bcfg2-dac88b71a1ea84f844a90925de8e479f270f9982.tar.gz bcfg2-dac88b71a1ea84f844a90925de8e479f270f9982.tar.bz2 bcfg2-dac88b71a1ea84f844a90925de8e479f270f9982.zip |
fix for Cfg file pull
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3590 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Cfg.py')
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index 207f4465f..aed17382c 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -373,7 +373,12 @@ class Cfg(Bcfg2.Server.Plugin.Plugin): answer = raw_input(gsq) if answer in 'Yy': - update_file(basefile.name, diff) + print "writing file, %s" % basefile.name + if fulldata: + newdata = fulldata + else: + newdata = '\n'.join(difflib.restore(diff.split('\n'), 1)) + open(basefile.name, 'w').write(newdata) return if ".H_%s" % (meta.hostname) in basefile.name: |