Use utf-8 as the default encoding
authorShivaram Lingamneni <slingamn@cs.stanford.edu>
Wed, 2 May 2012 02:35:08 +0000 (19:35 -0700)
committerShivaram Lingamneni <slingamn@cs.stanford.edu>
Wed, 2 May 2012 04:46:53 +0000 (21:46 -0700)
(fixes crashes on failure to import chardet)

requests/models.py

index ff0ef01..ac2811e 100644 (file)
@@ -791,7 +791,7 @@ class Response(object):
 
         # Trust that chardet isn't available or something went terribly wrong.
         except Exception:
-            pass
+            return 'utf-8'
 
 
     @property