Merge pull request #90 from dechristo/Issue-634

Replace base64.decodestring for base64.standard_b64decode
This commit is contained in:
k8s-ci-robot 2018-10-10 12:30:54 -07:00 committed by GitHub
commit 2d514ce31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):