I don't think this will work(I'd be very happy to learn I'm wrong though as this is fairly convenient way to write this). Consider using string.format instead so something like(note, line lengths are just best guesses in code below):

```python
log.warning('Could not create user with the email "{0}" as this is '
            'not a valid email'.format(username_or_email))
```