diff options
author | Konstantin L. Metlov <metlov@fti.dn.ua> | 2022-12-14 20:20:02 +0300 |
---|---|---|
committer | Jonah BrĂ¼chert <jbb@kaidan.im> | 2024-04-20 02:28:58 +0200 |
commit | 9ad86b6feca85f2243c8d4145218b0d67346ae52 (patch) | |
tree | 558b9ea8b386dc2566fe3a9c65d7007fe3e6ecd8 /src/lib | |
parent | 1c42611d170bae5c8bb3ce47389b9039204de654 (diff) | |
download | bcfg2-9ad86b6feca85f2243c8d4145218b0d67346ae52.tar.gz bcfg2-9ad86b6feca85f2243c8d4145218b0d67346ae52.tar.bz2 bcfg2-9ad86b6feca85f2243c8d4145218b0d67346ae52.zip |
encode the string data before writing in Cfg
Signed-off-by: Konstantin L. Metlov <metlov@fti.dn.ua>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py index e4013a347..05952c6c8 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py @@ -392,7 +392,7 @@ class CfgCreator(CfgBaseFileMatcher): "for %s: %s" % (fileloc, err)) try: - open(fileloc, 'wb').write(data) + open(fileloc, 'wb').write(data.encode()) self.core.block_for_fam_events() except IOError: err = sys.exc_info()[1] |