GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 017c7c10 authored by juga  's avatar juga
Browse files

fix: v3bwfile: Add constant for ordered key/values

to build the list of all keys from it and ensure no key is missing.
parent be0c5ea4
......@@ -32,6 +32,8 @@ KEYVALUE_SEP_V2 = ' '
# Header KeyValues
# =================
# KeyValues that need to be in a specific order in the Bandwidth File.
HEADER_KEYS_V1_1_ORDERED = ['version']
# List of the extra KeyValues accepted by the class
HEADER_KEYS_V1X = [
"software",
......@@ -114,7 +116,7 @@ HEADER_UNORDERED_KEYS = HEADER_KEYS_V1X + HEADER_KEYS_V1_2 + \
['latest_bandwidth'] + \
HEADER_KEYS_V1_4
# List of all the KeyValues currently being used to generate the file
HEADER_ALL_KEYS = ['version'] + HEADER_UNORDERED_KEYS
HEADER_ALL_KEYS = HEADER_KEYS_V1_1_ORDERED + HEADER_UNORDERED_KEYS
TERMINATOR = '====='
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment