X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=blobdiff_plain;f=conf_files.py;h=b13836f31082cf72abc6bdb7b4fd993f2c4f252a;hp=51a5b17a83d1c4098a724a98b3a8e1a998d71dd5;hb=5c978286e27531da994fe12d1090d7af9e7b03fd;hpb=3184dfd75f761d5a81408ead335ddbdd2346a375 diff --git a/conf_files.py b/conf_files.py index 51a5b17..b13836f 100755 --- a/conf_files.py +++ b/conf_files.py @@ -29,7 +29,7 @@ class conf_files: def checksum(self, path): try: with open(path) as feed: - return sha(feed.read()).digest() + return sha(feed.read().encode()).digest() except IOError: return None @@ -85,7 +85,7 @@ class conf_files: os.makedirs(os.path.dirname(dest)) except OSError: pass - tools.write_file(dest, lambda f: f.write(contents), + tools.write_file(dest, lambda f: f.write(contents.decode()), mode=mode, uidgid=(uid, gid)) if self.system(cf_rec['postinstall_cmd']): self.system(err_cmd)