Rename functions and files

This commit is contained in:
MisterDaneel 2019-02-16 18:07:31 +01:00
parent 8316712c75
commit 39467076e4
2 changed files with 4 additions and 4 deletions

View File

@ -14,11 +14,11 @@ from struct import unpack
logging.basicConfig(level=logging.DEBUG)
class torrent():
class process_torrent():
def __init__(self, configuration):
self.configuration = configuration
torrent_file = self.configuration['torrent:']
torrent_file = self.configuration['torrent']
with open(torrent_file, 'rb') as tf:
data = tf.read()
self.b_enc = bencoding()

View File

@ -1,4 +1,4 @@
from code.torrent import torrent
from code.process_torrent import process_torrent
import argparse
import json
import sys
@ -29,7 +29,7 @@ if __name__ == "__main__":
if not configuration:
sys.exit()
to = torrent('test.torrent')
to = process_torrent(configuration)
rep = to.tracker_start_request()
to.tracker_process()