Use six moves library to import HttpError
1 parent d173ef3 commit 124e2d5ff5cf376cc3ec3b1ff1162c34d5af6349
@Simon Hanna Simon Hanna authored on 25 Aug 2016
Showing 6 changed files
View
8
src/postorius/models.py
from django.dispatch import receiver
from django.http import Http404
from django_mailman3.lib.mailman import get_mailman_client
from mailmanclient import MailmanConnectionError
try:
from urllib2 import HTTPError
except ImportError:
from urllib.error import HTTPError
from django.utils.six.moves.urllib.error import HTTPError
 
logger = logging.getLogger(__name__)
 
 
View
8
src/postorius/tests/mailman_api_tests/test_domain_index.py
from allauth.account.models import EmailAddress
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django_mailman3.models import MailDomain
try:
from urllib2 import HTTPError
except ImportError:
from urllib.error import HTTPError
from django.utils.six.moves.urllib.error import HTTPError
 
from postorius.tests.utils import ViewTestCase
 
 
View
8
src/postorius/tests/mailman_api_tests/test_models.py
from __future__ import absolute_import, print_function, unicode_literals
 
from allauth.account.models import EmailAddress
from django.contrib.auth.models import User
try:
from urllib2 import HTTPError
except ImportError:
from urllib.error import HTTPError
from django.utils.six.moves.urllib.error import HTTPError
 
from postorius.tests.utils import ViewTestCase
 
 
View
src/postorius/views/domain.py
View
src/postorius/views/list.py
View
src/postorius/views/user.py