From 6f331acb59e9a430416e593e69e148929abe847b Mon Sep 17 00:00:00 2001 From: tejt99 <50763476+tejt99@users.noreply.github.com> Date: Sat, 3 Aug 2019 11:03:03 +0100 Subject: [PATCH] Update peer_stores.py Fixed errors --- pythorrent/peer_stores.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pythorrent/peer_stores.py b/pythorrent/peer_stores.py index b99a87d..3125a5b 100644 --- a/pythorrent/peer_stores.py +++ b/pythorrent/peer_stores.py @@ -15,7 +15,7 @@ import socket import random -from urlparse import urlparse +from urllib.parse import urlparse from struct import unpack from datetime import datetime, timedelta @@ -54,7 +54,7 @@ def store_from_url(url): class TrackerException(Exception): pass -class Tracker(object) +class Tracker(object): PEER = Peer TRACKER_INTERVAL = 1800 # seconds @@ -303,7 +303,7 @@ def scrape_request(self, connection_id): ) self.send(request) - return parse_scrape_response(transaction_id, info_hash) + return parse_scrape_response(transaction_id, info_hash) def parse_scrape_response(self, sent_transaction_id, info_hash): buf = self.socket.recvfrom(2048)[0]