From 8659dba82b1d5e6eedc70ed77592b3608c78afc4 Mon Sep 17 00:00:00 2001 From: raxxar1024 Date: Sat, 24 Jun 2017 09:40:18 +0800 Subject: [PATCH] raise exception when uploading file has Chinese characters. --- qiniu/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiniu/auth.py b/qiniu/auth.py index 8da00b8e..de3b015c 100644 --- a/qiniu/auth.py +++ b/qiniu/auth.py @@ -140,7 +140,7 @@ def upload_token(self, bucket, key=None, expires=3600, policy=None, strict_polic scope = bucket if key is not None: - scope = '{0}:{1}'.format(bucket, key) + scope = u'{0}:{1}'.format(bucket, key) args = dict( scope=scope,