Fix Issue-60: Replace encodestring and decodestring for standard_b64encode and standard_b64decode.

This commit is contained in:
Luiz Eduardo 2018-10-04 12:08:42 +02:00
parent 7d1e4495a8
commit 260d257939
2 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ class FileOrData(object):
else:
content = self._data
self._file = _create_temp_file_with_content(
base64.decodestring(content))
base64.standard_b64decode(content))
else:
self._file = _create_temp_file_with_content(self._data)
if self._file and not os.path.isfile(self._file):
@ -120,7 +120,7 @@ class FileOrData(object):
with open(self._file) as f:
if self._base64_file_content:
self._data = bytes.decode(
base64.encodestring(str.encode(f.read())))
base64.standard_b64encode(str.encode(f.read())))
else:
self._data = f.read()
return self._data

View File

@ -40,7 +40,7 @@ NON_EXISTING_FILE = "zz_non_existing_file_472398324"
def _base64(string):
return base64.encodestring(string.encode()).decode()
return base64.standard_b64encode(string.encode()).decode()
def _format_expiry_datetime(dt):