git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3184dfd
)
two more changes for python3 in the bytes vs str area
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 31 Dec 2018 15:32:23 +0000
(16:32 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 31 Dec 2018 17:48:41 +0000
(18:48 +0100)
conf_files.py
patch
|
blob
|
history
diff --git
a/conf_files.py
b/conf_files.py
index
51a5b17
..
b13836f
100755
(executable)
--- 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:
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
except IOError:
return None
@@
-85,7
+85,7
@@
class conf_files:
os.makedirs(os.path.dirname(dest))
except OSError:
pass
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)
mode=mode, uidgid=(uid, gid))
if self.system(cf_rec['postinstall_cmd']):
self.system(err_cmd)