Skip to content

Commit

Permalink
fallback for older httplib2
Browse files Browse the repository at this point in the history
git-svn-id: https://ilk.uvt.nl/svn/trunk/sources/pynlpl@13329 12f355fe-0486-481a-ad91-c297ab22b4e3
  • Loading branch information
proycon committed Sep 29, 2011
1 parent 635224a commit 0ccd65f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions clients/cornetto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import httplib2 # version 0.6.0+
import urlparse # renamed to urllib.parse in Python 3.0
import httplib, urllib, base64
from sys import stderr
#import pickle

printf = lambda x: sys.stdout.write(x+ "\n")
Expand All @@ -48,8 +49,12 @@ def connect(self):
if self.debug:
printf( "cornettodb/views/remote_open()" )
# permission denied on cornetto with apache
# http = httplib2.Http( ".cache" )
http = httplib2.Http(disable_ssl_certificate_validation=True)
# http = httplib2.Http( ".cache" )
try:
http = httplib2.Http(disable_ssl_certificate_validation=True)
except TypeError:
print >>stderr, "[CornettoClient] WARNING: Older version of httplib2! Can not disable_ssl_certificate_validation"
http = httplib2.Http() #for older httplib2

# VU DEBVisDic authentication
http.add_credentials( self.userid, self.passwd )
Expand Down

0 comments on commit 0ccd65f

Please sign in to comment.