[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Renaming dir_v*_reqs to dir_v*_requests
commit 63acd8169345270df0f1f6b545f67b5453b555fb
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sat May 12 18:11:29 2012 -0700
Renaming dir_v*_reqs to dir_v*_requests
It's a little understandable that we'd want to squeeze out a few characters in
the descriptors (er, or it would if we didn't compress them), but there's no
point for us to do the same.
---
stem/descriptor/extrainfo_descriptor.py | 12 ++++++------
test/unit/descriptor/extrainfo_descriptor.py | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py
index 58e2220..9b01ffc 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -159,8 +159,8 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor):
dir_stats_interval (int) - length in seconds of the interval
dir_v2_ips (dict) - mapping of locales to rounded count of requester ips
dir_v3_ips (dict) - mapping of locales to rounded count of requester ips
- dir_v2_reqs (dict) - mapping of locales to rounded count of requests
- dir_v3_reqs (dict) - mapping of locales to rounded count of requests
+ dir_v2_requests (dict) - mapping of locales to rounded count of requests
+ dir_v3_requests (dict) - mapping of locales to rounded count of requests
dir_v2_share (float) - percent of total directory traffic it expects to serve
dir_v3_share (float) - percent of total directory traffic it expects to serve
@@ -223,8 +223,8 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor):
self.dir_stats_interval = None
self.dir_v2_ips = None
self.dir_v3_ips = None
- self.dir_v2_reqs = None
- self.dir_v3_reqs = None
+ self.dir_v2_requests = None
+ self.dir_v3_requests = None
self.dir_v2_share = None
self.dir_v3_share = None
@@ -417,9 +417,9 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor):
elif keyword == "dirreq-v3-ips":
self.dir_v3_ips = locale_usage
elif keyword == "dirreq-v2-reqs":
- self.dir_v2_reqs = locale_usage
+ self.dir_v2_requests = locale_usage
elif keyword == "dirreq-v3-reqs":
- self.dir_v3_reqs = locale_usage
+ self.dir_v3_requests = locale_usage
elif keyword == "geoip-client-origins":
self.geoip_client_origins = locale_usage
elif keyword == "bridge-ips":
diff --git a/test/unit/descriptor/extrainfo_descriptor.py b/test/unit/descriptor/extrainfo_descriptor.py
index 24034be..d8849c0 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -269,7 +269,7 @@ class TestExtraInfoDescriptor(unittest.TestCase):
"""
for keyword in ('dirreq-v2-ips', 'dirreq-v3-ips', 'dirreq-v2-reqs', 'dirreq-v3-reqs', 'geoip-client-origins', 'bridge-ips'):
- attr = keyword.replace('-', '_').replace('dirreq', 'dir')
+ attr = keyword.replace('-', '_').replace('dirreq', 'dir').replace('reqs', 'requests')
test_entries = (
("", {}),
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits