File: python3.9-use-encodebytes-not-encodestring.patch

package info (click to toggle)
python-heatclient 2.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,440 kB
  • sloc: python: 18,471; makefile: 93; sh: 10
file content (17 lines) | stat: -rw-r--r-- 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Python 3.9: use encodebytes
 The base64.encodestring() methode is removed from Py 3.9.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: https://review.opendev.org/758552
Last-Update: 2020-10-16

--- python-heatclient-2.2.1.orig/heatclient/common/utils.py
+++ python-heatclient-2.2.1/heatclient/common/utils.py
@@ -420,7 +420,7 @@ def read_url_content(url):
         try:
             content.decode('utf-8')
         except ValueError:
-            content = base64.encodestring(content)
+            content = base64.encodebytes(content)
     return content