I think here are the following lines missing:
```python
        else:
            continue
        break
    else:
        raise ConfigNotFound('The config variable %s was not found.' % key)
```
THis is to check that the key exist. I suggest that the method should not return Nonw if the key does not exist.