diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2013-09-01 11:27:01 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2013-09-01 11:27:01 -0500 |
commit | 9279eee9c97a9366b04e738acac8c2dbd1215d5b (patch) | |
tree | b9bfe1b545249d143de75f4129f3c2b4dc7f4dd6 /src/lib | |
parent | 5980099af5b847a9dddc67ed4ecbb4c1df73ced8 (diff) | |
download | bcfg2-9279eee9c97a9366b04e738acac8c2dbd1215d5b.tar.gz bcfg2-9279eee9c97a9366b04e738acac8c2dbd1215d5b.tar.bz2 bcfg2-9279eee9c97a9366b04e738acac8c2dbd1215d5b.zip |
POSIX: Fix merge failure
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/POSIX/File.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/File.py b/src/lib/Bcfg2/Client/Tools/POSIX/File.py index c12188e1c..d7a70e202 100644 --- a/src/lib/Bcfg2/Client/Tools/POSIX/File.py +++ b/src/lib/Bcfg2/Client/Tools/POSIX/File.py @@ -57,7 +57,7 @@ class POSIXFile(POSIXTool): if isinstance(tempdata, str) and str != unicode: tempdatasize = len(tempdata) else: - tempdatasize = len(tempdata.encode(self.setup['encoding'])) + tempdatasize = len(tempdata.encode(Bcfg2.Options.setup.encoding)) different = False content = None @@ -79,7 +79,7 @@ class POSIXFile(POSIXTool): content = open(entry.get('name')).read() except UnicodeDecodeError: content = open(entry.get('name'), - encoding=self.setup['encoding']).read() + encoding=Bcfg2.Options.setup.encoding).read() except IOError: self.logger.error("POSIX: Failed to read %s: %s" % (entry.get("name"), sys.exc_info()[1])) @@ -117,7 +117,7 @@ class POSIXFile(POSIXTool): os.fdopen(newfd, 'w').write(filedata) else: os.fdopen(newfd, 'wb').write( - filedata.encode(self.setup['encoding'])) + filedata.encode(Bcfg2.Options.setup.encoding)) except (OSError, IOError): err = sys.exc_info()[1] self.logger.error("POSIX: Failed to open temp file %s for writing " |