[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/master] fix: v3bwfile: !refactor, Replace constant



commit ed24b53d3f604c3da784743d6592e28716854ca3
Author: juga0 <juga@xxxxxxxxxx>
Date:   Sun Feb 9 16:53:57 2020 +0000

    fix: v3bwfile: !refactor, Replace constant
    
    Replace HEADER_INIT_KEYS constant KeyValues with other constants
    created in the previous commit.
    
    Part of #30196.
---
 sbws/lib/v3bwfile.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index b3a4775..49015c0 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -120,11 +120,14 @@ HEADER_KEYS_V1_4 = [
     # The time it took to report about half of the network.
     'time_to_report_half_network',
 ] + HEADER_RECENT_MEASUREMENTS_EXCLUDED_KEYS
-HEADER_INIT_KEYS = \
-    ['earliest_bandwidth', 'generator_started',
-     'scanner_country', 'destinations_countries']\
-    + HEADER_KEYS_V1_2 \
+
+# KeyValues that are initialized from arguments, not self-initialized.
+HEADER_INIT_KEYS = (
+    HEADER_KEYS_V1_1_TO_INIT
+    + HEADER_KEYS_V1_3
+    + HEADER_KEYS_V1_2
     + HEADER_KEYS_V1_4
+)
 
 HEADER_INT_KEYS = HEADER_KEYS_V1_2 + HEADER_KEYS_V1_4
 # List of all unordered KeyValues currently being used to generate the file



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits