Skip to content

Commit

Permalink
Remove Python 3.4 compatibility code.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedrow authored and auvipy committed Jan 6, 2022
1 parent 7f9daab commit 0620eb2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions celery/utils/saferepr.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,7 @@ def _repr_binary_bytes(val):
return val.decode('utf-8')
except UnicodeDecodeError:
# possibly not unicode, but binary data so format as hex.
try:
ashex = val.hex
except AttributeError: # pragma: no cover
# Python 3.4
return val.decode('utf-8', errors='replace')
else:
# Python 3.5+
return ashex()
return val.hex()


def _format_chars(val, maxlen):
Expand Down

0 comments on commit 0620eb2

Please sign in to comment.