Fix variable naming

This commit is contained in:
manmorjim 2020-02-12 10:09:07 +01:00
parent 55ebc73f9e
commit c8410541a4

View File

@ -202,9 +202,9 @@ $$
data_to_encode = '%s:%s' % (username, password) data_to_encode = '%s:%s' % (username, password)
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
data_encoded = base64.encodestring(data_to_encode) data_encoded = base64.encodestring(data_to_encode)
else: else:
data_encoded = base64.b64encode(data_to_encode.encode()).decode() data_encoded = base64.b64encode(data_to_encode.encode()).decode()
data_encoded = data_encoded.replace('\n', '') data_encoded = data_encoded.replace('\n', '')
return data_encoded return data_encoded
@ -220,7 +220,7 @@ $$
import httplib as client import httplib as client
except: except:
from http import client from http import client
python_v3 = False python_v2 = False
params = plpy.execute("select c.host, c.port, c.timeout, c.auth from @extschema@._CDB_Group_API_Conf() c;")[0] params = plpy.execute("select c.host, c.port, c.timeout, c.auth from @extschema@._CDB_Group_API_Conf() c;")[0]
if params['host'] is None: if params['host'] is None: