aboutsummaryrefslogtreecommitdiff
path: root/tor-metrics
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2019-06-21 18:05:48 -0700
committerJordan <me@jordan.im>2019-06-21 18:05:48 -0700
commitfc58403a0187e4c707d46a0f5fe9a80f3852e791 (patch)
tree97ecf19745d0b2d4337f0855c7424c45412a6b5c /tor-metrics
parent3bfc4809d0205565103fe76cc0921c6de4b2a90b (diff)
downloadallium-fc58403a0187e4c707d46a0f5fe9a80f3852e791.tar.gz
allium-fc58403a0187e4c707d46a0f5fe9a80f3852e791.zip
readme, relays.py trailing whitespace
Diffstat (limited to 'tor-metrics')
-rw-r--r--tor-metrics/relays.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tor-metrics/relays.py b/tor-metrics/relays.py
index 31f4bd9..2c88528 100644
--- a/tor-metrics/relays.py
+++ b/tor-metrics/relays.py
@@ -17,7 +17,7 @@ class Relays:
with open(self.ts_file, 'r') as ts_file:
prev_timestamp = ts_file.read()
try:
- conn = urllib.request.Request(self.url,
+ conn = urllib.request.Request(self.url,
headers={"If-Modified-Since": prev_timestamp})
api_response = urllib.request.urlopen(conn).read()
self.statuscode = urllib.request.urlopen(conn).getcode()
@@ -36,7 +36,7 @@ class Relays:
return(None)
except URLError as e:
return(None)
-
+
json_data = json.loads(api_response.decode('utf-8'))
sorted_json = self.sort_by_bandwidth(json_data)
trimmed_json = self.trim_platform(sorted_json)