diff --git a/scripts-available/CDB_Groups_API.sql b/scripts-available/CDB_Groups_API.sql index 0c524fd..4203531 100644 --- a/scripts-available/CDB_Groups_API.sql +++ b/scripts-available/CDB_Groups_API.sql @@ -201,9 +201,9 @@ $$ import base64 data_to_encode = '%s:%s' % (username, password) - if sys.version_info[0] < 3: -- python 2.x + if sys.version_info[0] < 3: data_encoded = base64.encodestring(data_to_encode) - else: -- python 3.x + else: data_encoded = base64.b64encode(data_to_encode.encode()).decode() data_encoded = data_encoded.replace('\n', '')