lericson/simples3 — Issue #10: UnboundLocalError on S3Bucket.listdir() method
Author: dahlia
Created: 2012-01-08 17:27:13+00:00
State: open

`S3Bucket.listdir()` method raises `UnboundLocalError`. It seems to occur when its result list is empty, but I have no idea about its detail. What is `next_marker` attribute for?

```pytb
Traceback (most recent call last):
File "/.../app.py", line 134, in list_sizes
keys = list(self.bucket.listdir(prefix=prefix + '/'))
File "/home/styleshare/lib/python2.7/site-packages/simples3/bucket.py", line 395, in listdir
for item in listing:
File "/home/styleshare/lib/python2.7/site-packages/simples3/bucket.py", line 189, in __iter__
self.next_marker = item[0]
UnboundLocalError: local variable 'item' referenced before assignment
```