Finds the value in the list that corresponds with the value of compare.
(list, compare)
| 203 | |
| 204 | |
| 205 | def __find_and_remove_value(list, compare): |
| 206 | """Finds the value in the list that corresponds with the value of compare.""" |
| 207 | # next throws if there are no matches |
| 208 | try: |
| 209 | found = next(value for value in list |
| 210 | if value['name'] == compare['name'] and value['switch'] == |
| 211 | compare['switch']) |
| 212 | except: |
| 213 | return None |
| 214 | |
| 215 | list.remove(found) |
| 216 | |
| 217 | return found |
| 218 | |
| 219 | |
| 220 | def __normalize_switch(switch, separator): |
no test coverage detected
searching dependent graphs…