git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
second pass on all uses of base64encodings, so at to always return str like it was...
[plcapi.git]
/
PLC
/
Methods
/
GenerateNodeConfFile.py
diff --git
a/PLC/Methods/GenerateNodeConfFile.py
b/PLC/Methods/GenerateNodeConfFile.py
index
13a17b7
..
f7f7bcf
100644
(file)
--- a/
PLC/Methods/GenerateNodeConfFile.py
+++ b/
PLC/Methods/GenerateNodeConfFile.py
@@
-68,9
+68,9
@@
class GenerateNodeConfFile(Method):
# Generate 32 random bytes
int8s = random.sample(range(0, 256), 32)
# Base64 encode their string representation
# Generate 32 random bytes
int8s = random.sample(range(0, 256), 32)
# Base64 encode their string representation
- node['key'] = base64.b64encode(bytes(int8s))
+ node['key'] = base64.b64encode(bytes(int8s))
.decode()
# XXX Boot Manager cannot handle = in the key
# XXX Boot Manager cannot handle = in the key
- node['key'] = node['key'].replace(
b"=", b
"")
+ node['key'] = node['key'].replace(
"=",
"")
# Save it
node.sync()
# Save it
node.sync()