[tor-commits] [sbws/master] Add new constants to use as header attributes

juga at torproject.org juga at torproject.org
Wed Oct 24 09:40:23 UTC 2018


commit a53611826fd5ddbc9b8e72cd719f8f7f57d4b382
Author: juga0 <juga at riseup.net>
Date:   Thu Oct 18 21:51:34 2018 +0000

    Add new constants to use as header attributes
---
 sbws/lib/v3bwfile.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index c69e674..e67e556 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -27,8 +27,13 @@ KEYVALUE_SEP_V200 = ' '
 # List of the extra KeyValues accepted by the class
 EXTRA_ARG_KEYVALUES = ['software', 'software_version', 'file_created',
                        'earliest_bandwidth', 'generator_started']
+STATS_KEYVALUES = ['num_measured_relays', 'num_target_relays',
+                   'num_net_relays', 'perc_measured_relays',
+                   'perc_measured_targed']
+KEYVALUES_INT = STATS_KEYVALUES
 # List of all unordered KeyValues currently being used to generate the file
-UNORDERED_KEYVALUES = EXTRA_ARG_KEYVALUES + ['latest_bandwidth']
+UNORDERED_KEYVALUES = EXTRA_ARG_KEYVALUES + STATS_KEYVALUES + \
+                      ['latest_bandwidth']
 # List of all the KeyValues currently being used to generate the file
 ALL_KEYVALUES = ['version'] + UNORDERED_KEYVALUES
 TERMINATOR = '===='





More information about the tor-commits mailing list