summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorHolger Weiß <holger@zedat.fu-berlin.de>2011-05-19 23:08:48 +0200
committerHolger Weiß <holger@zedat.fu-berlin.de>2011-05-19 23:08:48 +0200
commit85d52b2426b0f980e1b42ec8f90c888bbf68ce54 (patch)
tree24a493ac52bb4c3ea6a51da65be2f165fa88bad2 /src/sbin
parent661405723930c64ca20fbb8191b6772cef919ea6 (diff)
downloadbcfg2-85d52b2426b0f980e1b42ec8f90c888bbf68ce54.tar.gz
bcfg2-85d52b2426b0f980e1b42ec8f90c888bbf68ce54.tar.bz2
bcfg2-85d52b2426b0f980e1b42ec8f90c888bbf68ce54.zip
Revert "bcfg2: Write cached config using encoding from Options.py"
This reverts commit 5d69ff7e966c4ffa911c78d11a6879b48e90aef8. As the "rawconfig" variable now holds a UTF-8 encoded string, it would have to be decoded before re-encoding it using a different encoding. However, the cached configuration shouldn't be written using a non-UTF-8 encoding anyway, as "bcfg2 -f <configuration>" currently doesn't accept any other encodings. (If this is to be changed, the XML encoding declaration of the configuration would have to be adjusted accordingly.)
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg22
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 996d773ff..eb41af640 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -252,7 +252,7 @@ class Client:
if self.setup['cache']:
try:
- open(self.setup['cache'], 'w').write(rawconfig.encode(self.setup['encoding']))
+ open(self.setup['cache'], 'w').write(rawconfig)
os.chmod(self.setup['cache'], 33152)
except IOError:
self.logger.warning("Failed to write config cache file %s" %