summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2021-04-30 14:10:28 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2021-04-30 14:31:02 +0200
commitfe08a6a9d176bd198894f7ff58ae2417a0ce9f24 (patch)
tree480e422b9324c26719affc830d7c6757d417f4a4 /lib
parent53ebc0909d2672ed1dc501321520ba165df08465 (diff)
security_db: replace base64.encodestring with encodebytes
It was an alias for the latter, and has finally been removed in Python 3.9. Likewise for decodestring.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/security_db.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index 396df949c6..674adeb342 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -1569,7 +1569,7 @@ class DB:
kind, urgency_to_flag[urgency], remote,
fix_available,
package, fixed_version, description))
- result = base64.encodestring(zlib.compress(''.join(result).encode('utf-8'), 9))
+ result = base64.encodebytes(zlib.compress(''.join(result).encode('utf-8'), 9))
c.execute(
"INSERT OR REPLACE INTO debsecan_data (name, data) VALUES (?, ?)",
@@ -1740,7 +1740,7 @@ class DB:
source_packages.sort()
def store_value(name, value):
- value = base64.encodestring(zlib.compress(value.encode('utf-8'), 9))
+ value = base64.encodebytes(zlib.compress(value.encode('utf-8'), 9))
c.execute("""INSERT OR REPLACE INTO debsecan_data
VALUES (?, ?)""", (name, value))
@@ -1791,7 +1791,7 @@ class DB:
"""Returns the debsecan data item NAME."""
for (data,) in self.cursor().execute(
"SELECT data FROM debsecan_data WHERE name = ?", (name,)):
- return base64.decodestring(data)
+ return base64.decodebytes(data)
else:
return None

© 2014-2024 Faster IT GmbH | imprint | privacy policy