tags 568875 + patch
thanks

Included a patch for the current version. Hope it helps :)

Thanks,
Paul

-- 
All programmers are playwrights, and all computers are lousy actors.

#define sizeof(x) rand()
:wq
Author: Paul Tagliamonte <paul...@ubuntu.com>
Date: Thu, 23 Feb 2012 16:49:44 -0500
Subject: Removing any unchecked imports against simplejson
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/568875
Origin: vendor
Description: simplejson is included as "json" in Python
 
 * t.py, twitter_test.py: Added a try/catch around the import

---
 t.py            |    6 +++++-
 twitter_test.py |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/t.py b/t.py
index 9e2f00a..94a3fd0 100644
--- a/t.py
+++ b/t.py
@@ -2,7 +2,11 @@ import os, sys
 import time
 import datetime
 
-import simplejson
+try:
+  import json as simplejson
+except ImportError:
+  import simplejson
+
 import twitter
 
 if __name__ == '__main__':
diff --git a/twitter_test.py b/twitter_test.py
index 523e524..8021704 100755
--- a/twitter_test.py
+++ b/twitter_test.py
@@ -20,12 +20,16 @@
 __author__ = 'python-twit...@googlegroups.com'
 
 import os
-import simplejson
 import time
 import calendar
 import unittest
 import urllib
 
+try:
+  import json as simplejson
+except ImportError:
+  import simplejson
+
 import twitter
 
 class StatusTest(unittest.TestCase):
-- 
1.7.5.4

Reply via email to