Skip to content

Commit bed7e9e

Browse files
committed
rsf eof
1 parent d433c55 commit bed7e9e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

qiniu/rsf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ def list_prefix(self, bucket, prefix=None, marker=None, limit=None):
2727
if prefix is not None:
2828
ops['prefix'] = prefix
2929
url = '%s?%s' % ('/list', urllib.urlencode(ops))
30-
return self.conn.call_with(url, body=None, content_type='application/x-www-form-urlencoded')
30+
ret, err = self.conn.call_with(url, body=None, content_type='application/x-www-form-urlencoded')
31+
if not ret.get('marker'):
32+
err = 'EOF'
33+
return ret, err

qiniu/test/rsf_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestRsf(unittest.TestCase):
1212
def test_list_prefix(self):
1313
c = rsf.Client()
1414
ret, err = c.list_prefix(bucket_name)
15-
assert err is None
15+
assert err is 'EOF'
1616
self.assertEqual(len(ret.get('items'))>0, True)
1717

1818

0 commit comments

Comments
 (0)