Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #90 from dechristo/Issue-634
Browse files Browse the repository at this point in the history
Replace base64.decodestring for base64.standard_b64decode
  • Loading branch information
k8s-ci-robot authored Oct 10, 2018
2 parents 7d1e449 + 260d257 commit 2d514ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def as_file(self):
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):
Expand All @@ -120,7 +120,7 @@ def as_data(self):
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
Expand Down
2 changes: 1 addition & 1 deletion config/kube_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


def _base64(string):
return base64.encodestring(string.encode()).decode()
return base64.standard_b64encode(string.encode()).decode()


def _format_expiry_datetime(dt):
Expand Down

0 comments on commit 2d514ce

Please sign in to comment.