mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
python: Remove default "utf8" argument for encode(), decode().
Partially generated by pyupgrade. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1760897a8c
commit
ad5f0c05b5
@@ -1286,7 +1286,7 @@ def do_deactivate_stream(
|
||||
|
||||
# Prepend a substring of the hashed stream ID to the new stream name
|
||||
streamID = str(stream.id)
|
||||
stream_id_hash_object = hashlib.sha512(streamID.encode("utf-8"))
|
||||
stream_id_hash_object = hashlib.sha512(streamID.encode())
|
||||
hashed_stream_id = stream_id_hash_object.hexdigest()[0:7]
|
||||
|
||||
new_name = (hashed_stream_id + "!DEACTIVATED:" + old_name)[: Stream.MAX_NAME_LENGTH]
|
||||
|
||||
Reference in New Issue
Block a user