Perhaps it would be cleaner as

```python
if parser.has_option(section, name):
    raw = ...
    ...
```