diff --git a/code/torrent.py b/code/process_torrent.py similarity index 97% rename from code/torrent.py rename to code/process_torrent.py index 7f6025d..f4c5c3e 100644 --- a/code/torrent.py +++ b/code/process_torrent.py @@ -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() diff --git a/main.py b/ratio.py similarity index 89% rename from main.py rename to ratio.py index b99e70f..f5fe775 100644 --- a/main.py +++ b/ratio.py @@ -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()