Revision: 6953
Author: russblau
Date: 2009-06-11 18:38:08 +0000 (Thu, 11 Jun 2009)
Log Message:
-----------
change import sequence; required to allow using patched version of httplib2
with Python 2.6
Modified Paths:
--------------
branches/rewrite/pywikibot/comms/threadedhttp.py
Modified: branches/rewrite/pywikibot/comms/threadedhttp.py
===================================================================
--- branches/rewrite/pywikibot/comms/threadedhttp.py 2009-06-11 17:14:51 UTC
(rev 6952)
+++ branches/rewrite/pywikibot/comms/threadedhttp.py 2009-06-11 18:38:08 UTC
(rev 6953)
@@ -43,10 +43,11 @@
u"Error: You need the python module setuptools to use this module",
level=pywikibot.CRITICAL)
sys.exit(1)
-pkg_resources.require("httplib2")
-import httplib2
+try:
+ import httplib2
+except ImportError:
+ pkg_resources.require("httplib2")
-
class ConnectionPool(object):
"""A thread-safe connection pool."""
_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn