diff --git a/ox/torrent/bencode3.py b/ox/torrent/bencode3.py index 0b7788e..eefda6f 100644 --- a/ox/torrent/bencode3.py +++ b/ox/torrent/bencode3.py @@ -121,7 +121,7 @@ def _encode_dict(d, buff): """ buff.append(b'd') for k in sorted(d): - if not isinstance(k, [bytes, str]): + if not isinstance(k, (bytes, str)): k = str(k) _encode(k, buff) _encode(d[k], buff)