Skip to content

Commit

Permalink
Avoid DeprecationWarning about base64.decodestring in Py3
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Feb 28, 2013
1 parent 5bc41c9 commit 2d18187
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ZODB/blob.py
Expand Up @@ -14,7 +14,6 @@
"""Blobs
"""

import base64
import binascii
import logging
import os
Expand All @@ -32,7 +31,7 @@
from ZODB.interfaces import BlobError
from ZODB import utils
from ZODB.POSException import POSKeyError
from ZODB._compat import BytesIO, Unpickler
from ZODB._compat import BytesIO, Unpickler, decodebytes


if sys.version_info[0] >= 3:
Expand Down Expand Up @@ -824,7 +823,7 @@ def undo(self, serial_id, transaction):

# The serial_id is assumed to be given to us base-64 encoded
# (belying the web UI legacy of the ZODB code :-()
serial_id = base64.decodestring(serial_id + b'\n')
serial_id = decodebytes(serial_id + b'\n')

self._lock_acquire()

Expand Down

0 comments on commit 2d18187

Please sign in to comment.