you can replace the try...except block with the following:
```python
name = contributor.get('name', contributor['login'])
```