From 546f518448897ca5983f2bfbc0a00694bd322204 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 17 Sep 2016 17:20:17 +0200 Subject: [PATCH] isinstance takes tuple not list --- ox/torrent/bencode3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)