mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 00:45:52 +00:00
Use the function I specifically wrote for this!
This commit is contained in:
parent
8f4a0379ea
commit
721b02b262
@ -134,8 +134,7 @@ def a2b(cs):
|
|||||||
@param cs the base-32 encoded data (as bytes)
|
@param cs the base-32 encoded data (as bytes)
|
||||||
"""
|
"""
|
||||||
# Workaround Future newbytes issues by converting to real bytes on Python 2:
|
# Workaround Future newbytes issues by converting to real bytes on Python 2:
|
||||||
if hasattr(cs, "__native__"):
|
cs = backwardscompat_bytes(cs)
|
||||||
cs = cs.__native__()
|
|
||||||
precondition(could_be_base32_encoded(cs), "cs is required to be possibly base32 encoded data.", cs=cs)
|
precondition(could_be_base32_encoded(cs), "cs is required to be possibly base32 encoded data.", cs=cs)
|
||||||
precondition(isinstance(cs, bytes), cs)
|
precondition(isinstance(cs, bytes), cs)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user