From 599abaa8b6c39ff179633a4f835ae20cea79062f Mon Sep 17 00:00:00 2001 From: gotlium Date: Fri, 21 Jul 2017 16:48:42 +0500 Subject: [PATCH] nexmo fixes --- dbmail/providers/nexmo/sms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dbmail/providers/nexmo/sms.py b/dbmail/providers/nexmo/sms.py index 3ee1230..a0fc5fb 100644 --- a/dbmail/providers/nexmo/sms.py +++ b/dbmail/providers/nexmo/sms.py @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- -from urllib import urlopen, urlencode +try: + from urllib import urlopen, urlencode +except ImportError: + from urllib.request import urlopen + from urllib.parse import urlencode from json import loads from django.conf import settings