Merge pull request #90 from dechristo/Issue-634
Replace base64.decodestring for base64.standard_b64decode
This commit is contained in:
commit
2d514ce31d
@ -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
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user