mirror of
https://github.com/NohamR/Ratio.py.git
synced 2025-05-24 00:38:57 +00:00
Rename functions and files
This commit is contained in:
parent
8316712c75
commit
39467076e4
@ -14,11 +14,11 @@ from struct import unpack
|
|||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
class torrent():
|
class process_torrent():
|
||||||
|
|
||||||
def __init__(self, configuration):
|
def __init__(self, configuration):
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
torrent_file = self.configuration['torrent:']
|
torrent_file = self.configuration['torrent']
|
||||||
with open(torrent_file, 'rb') as tf:
|
with open(torrent_file, 'rb') as tf:
|
||||||
data = tf.read()
|
data = tf.read()
|
||||||
self.b_enc = bencoding()
|
self.b_enc = bencoding()
|
@ -1,4 +1,4 @@
|
|||||||
from code.torrent import torrent
|
from code.process_torrent import process_torrent
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
@ -29,7 +29,7 @@ if __name__ == "__main__":
|
|||||||
if not configuration:
|
if not configuration:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
to = torrent('test.torrent')
|
to = process_torrent(configuration)
|
||||||
rep = to.tracker_start_request()
|
rep = to.tracker_start_request()
|
||||||
to.tracker_process()
|
to.tracker_process()
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user