Ran
|
Jobs
2
|
Files
32
|
Run time
6min
|
Badge
README BADGES
|
push
travis-ci
Fix an additional four bugs in bridgdb.Bridges.parseExtraInfoFile(). In addition to the one-character bug for #12932 which was fixed in commit 487c1b6c1, there were an additional four bugs in the legacy parser, `bridgedb.Bridges.parseExtraInfoFile()` (which I am about to deprecate anyway for #9380): # get the transport line if ID and line.startswith("transport "): fields = line[10:].split() # [ arglist ] field, optional if len(fields) >= 3: arglist = fields[2:] # BUGS 1 and 2 # parse arglist [k=v,...k=v] as argdict {k:v,...,k:v} argdict = {} for arg in arglist: try: k,v = arg.split('=') # BUG 3 except ValueError: continue # BUG 4 argdict[k] = v logging.debug(" Parsing Argument: %s: %s", k, v) BUG 1: This assumes the PT arguments are space-separated in the extrainfo descriptor. They are not; they are comma-separated. BUG 2: This would result in parsing the entire, comma-separated group of PT arguments into: {"key1": "a,key2=b,key3=c"} BUG 3: This would produce a ValueError, because there's more than one '=' character. (Meaning that the whole set of arguments would be discarded due to Bug #4.) BUG 4: The whole set of arguments gets discarded, without even so much as a log message, if there was more than one argument. These are all bug fixes on a single commit, 4300329a3, from #4568. And I'm still deprecating the entire function anyway (for #9380) because the rest of it is likely just as full of bugs. * FIXES #12932 https://bugs.torproject.org/12932
2893 of 4038 relevant lines covered (71.64%)
1.43 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 654.1 (TWISTED_VERSION=13.2.0 PYOPENSSL_VERSION=0.13.1) | 32 |
71.64 |
Travis Job 654.1 | |
3 | 654.3 (TWISTED_VERSION=14.0.0 PYOPENSSL_VERSION=0.14) | 32 |
71.64 |
Travis Job 654.3 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|