This is a common pattern, maybe create a function for it?

```python
def vars_or_default(name):
  if name in variables:
    return variables[name]
  else:
    _log.deprecated("%s is not set in config, returning default" % name)
    defaults = get_default_oldstyle_configfile_defaults()
    return defaults[name
```

(maybe a better function name is needed though ;-))