cStringIO fix.
authorKenneth Reitz <me@kennethreitz.com>
Fri, 18 Feb 2011 21:00:34 +0000 (16:00 -0500)
committerKenneth Reitz <me@kennethreitz.com>
Fri, 18 Feb 2011 21:00:34 +0000 (16:00 -0500)
test_requests.py

index 7ea35343aeb40510d911e404b639abb6a76e368b..963abbc1d2be8213d0740cf660e25b18ca4a5a87 100644 (file)
@@ -2,7 +2,11 @@
 # -*- coding: utf-8 -*-
 
 import unittest
-from cStringIO import StringIO
+
+try:
+    from cStringIO import StringIO
+except ImportError:
+    from StringIO import StringIO
 
 import requests