summaryrefslogtreecommitdiff
path: root/libmat2/torrent.py
diff options
context:
space:
mode:
authorintrigeri2019-02-03 09:43:27 +0000
committerjvoisin2019-02-03 19:18:41 +0100
commite8c1bb0e3c4cae579e81ce6a4b01b829900ff922 (patch)
treecd7146283c98f25544334cdd322b8c577ccc40d3 /libmat2/torrent.py
parent8b5d0c286c91537b43eb3284aa93b382636e7ebf (diff)
Whenever possible, use bwrap for subprocesses
This should closes #90
Diffstat (limited to 'libmat2/torrent.py')
-rw-r--r--libmat2/torrent.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmat2/torrent.py b/libmat2/torrent.py
index 4d6c1e0..c006f9c 100644
--- a/libmat2/torrent.py
+++ b/libmat2/torrent.py
@@ -3,6 +3,7 @@ from typing import Union, Tuple, Dict
3 3
4from . import abstract 4from . import abstract
5 5
6
6class TorrentParser(abstract.AbstractParser): 7class TorrentParser(abstract.AbstractParser):
7 mimetypes = {'application/x-bittorrent', } 8 mimetypes = {'application/x-bittorrent', }
8 whitelist = {b'announce', b'announce-list', b'info'} 9 whitelist = {b'announce', b'announce-list', b'info'}
@@ -32,7 +33,7 @@ class TorrentParser(abstract.AbstractParser):
32 return True 33 return True
33 34
34 35
35class _BencodeHandler(object): 36class _BencodeHandler():
36 """ 37 """
37 Since bencode isn't that hard to parse, 38 Since bencode isn't that hard to parse,
38 MAT2 comes with its own parser, based on the spec 39 MAT2 comes with its own parser, based on the spec