Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
plq committed Jan 31, 2022
1 parent 3927f98 commit 61917b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions spyne/model/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def is_default(cls):
@classmethod
def to_base64(cls, value):
if isinstance(value, (list, tuple)) and isinstance(value[0], mmap):
# TODO: be smarter about this
return b64encode(value[0])

if isinstance(value, (six.binary_type, memoryview, mmap)):
Expand Down
3 changes: 2 additions & 1 deletion spyne/protocol/dictdoc/hier.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

from mmap import mmap
from collections import defaultdict
from spyne.util.six.moves.collections_abc import Iterable as AbcIterable

from spyne.util import six
from spyne.util.six.moves.collections_abc import Iterable as AbcIterable

from spyne.error import ValidationError
from spyne.error import ResourceNotFoundError

Expand Down

0 comments on commit 61917b9

Please sign in to comment.