Skip to content

Commit

Permalink
Use ImportError - ModuleNotFoundError is py3.6 only
Browse files Browse the repository at this point in the history
  • Loading branch information
thornomad committed Mar 8, 2018
1 parent 72785cf commit bddf43d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hitcount/templatetags/hitcount_tags.py
Expand Up @@ -6,7 +6,7 @@
from django.contrib.contenttypes.models import ContentType
try:
from django.core.urlresolvers import reverse
except ModuleNotFoundError:
except ImportError:
from django.urls import reverse

from hitcount.models import HitCount
Expand Down
2 changes: 1 addition & 1 deletion tests/test_admin.py
Expand Up @@ -5,7 +5,7 @@
from django.core.exceptions import PermissionDenied
try:
from django.core.urlresolvers import reverse
except ModuleNotFoundError:
except ImportError:
from django.urls import reverse
from django.contrib.admin.sites import AdminSite
from django.contrib.messages.storage.fallback import FallbackStorage
Expand Down
2 changes: 1 addition & 1 deletion tests/test_selenium.py
Expand Up @@ -7,7 +7,7 @@
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
try:
from django.core.urlresolvers import reverse
except ModuleNotFoundError:
except ImportError:
from django.urls import reverse

from selenium import webdriver
Expand Down

0 comments on commit bddf43d

Please sign in to comment.