X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGenerateNodeConfFile.py;fp=PLC%2FMethods%2FGenerateNodeConfFile.py;h=f7f7bcf0cda6e348bf9539ecba2327376a5fac62;hb=bf1ee443b4322709f445a6f94c53c4c1a6cafa90;hp=13a17b75c654566398b09c43375af3621c8962ff;hpb=8201983e9b1ba59dc22649e8cdf91bab6008fd4d;p=plcapi.git diff --git a/PLC/Methods/GenerateNodeConfFile.py b/PLC/Methods/GenerateNodeConfFile.py index 13a17b7..f7f7bcf 100644 --- 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 - node['key'] = base64.b64encode(bytes(int8s)) + node['key'] = base64.b64encode(bytes(int8s)).decode() # XXX Boot Manager cannot handle = in the key - node['key'] = node['key'].replace(b"=", b"") + node['key'] = node['key'].replace("=", "") # Save it node.sync()