Skip to content

Commit afd8322

Browse files
author
ZhaoYu
committed
1. catch ret None issue in rsf.py
2. make param expires optional for GetPolicy in rs/rs_token.py
1 parent b9e2a04 commit afd8322

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

qiniu/rs/rs_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def token(self, mac=None):
7777

7878
class GetPolicy(object):
7979
expires = 3600
80-
def __init__(self):
81-
pass
80+
def __init__(self, expires=3600):
81+
self.expires = expires
8282

8383
def make_request(self, base_url, mac=None):
8484
'''

qiniu/rsf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ def list_prefix(self, bucket, prefix=None, marker=None, limit=None):
3636
ops['prefix'] = prefix
3737
url = '%s?%s' % ('/list', urllib.urlencode(ops))
3838
ret, err = self.conn.call_with(url, body=None, content_type='application/x-www-form-urlencoded')
39-
if not ret.get('marker'):
39+
if not ret or not ret.get('marker'):
4040
err = EOF
4141
return ret, err

0 commit comments

Comments
 (0)