Skip to content

Commit

Permalink
Fixed pylint issues in module tcms.core.contrib.auth
Browse files Browse the repository at this point in the history
  • Loading branch information
asankov authored and atodorov committed Mar 30, 2018
1 parent c1f2f95 commit 1bc62ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tcms/core/contrib/auth/__init__.py
@@ -1,17 +1,19 @@
# -*- coding: utf-8 -*-

from importlib import import_module

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from importlib import import_module


def get_backend(path):
i = path.rfind('.')
module, attr = path[:i], path[i + 1:]
try:
mod = import_module(module)
except ImportError as e:
except ImportError as err:
raise ImproperlyConfigured(
'Error loading registration backend %s: "%s"' % (module, e)
'Error loading registration backend %s: "%s"' % (module, err)
)
try:
backend_class = getattr(mod, attr)
Expand Down

0 comments on commit 1bc62ed

Please sign in to comment.