I think you can do this:

``` 
for g in git_protocols:
    if parent_url.startswith(g):
        git_protocol_handler = g
        break
else:
    conf.fatal(message: unsupported protocol)
```
To all the if statements.