This is pretty awkward code; why not just do:

```python
sorted((name, self.md5sum(path) for ...)
```