summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/sbin/bcfg22
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index bbdbba68d..1075cfc86 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -231,7 +231,7 @@ class Client:
if self.setup['cache']:
try:
- open(self.setup['cache'], 'w').write(rawconfig)
+ open(self.setup['cache'], 'w').write(rawconfig.encode(self.setup['encoding']))
os.chmod(self.setup['cache'], 33152)
except IOError:
self.logger.warning("failed to write config cache file %s" %