sms_carrier_ovh: use urllib2 which correctly handle https proxies

This commit is contained in:
Benjamin Dauvergne 2013-09-11 16:04:24 +02:00
parent a997886429
commit abee690dcc
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import logging
import urllib
import urllib2
import json
from django.conf import settings
@ -28,7 +28,7 @@ class OVHSMSCarrier(object):
django_journal.error_record('ovh-sms',
'OVH SMS CARRIER: sending message {message} to {numbers}',
message=message, numbers=to)
stream = urllib.urlopen('%s?%s' % (self.URL, urllib.urlencode(params)))
stream = urllib2.urlopen('%s?%s' % (self.URL, urllib.urlencode(params)))
result = json.loads(stream.read())
if 100 <= result['status'] < 200:
credit_alert = getattr(settings, 'OVH_SMS_CREDIT_ALERT', 100)