Why not do:

```python
if ident is None:
    continue
```

This will decrease the indentation needed.