summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Server/Plugins/Cfg.py7
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: