Right and
```
all_handles = list(all_handles) 
```
runs through the generator until it is exhausted and make `all_handles` a list.  The loop should then work correctly.