Skip to content

Commit 43d182e

Browse files
ReeceReece
authored andcommitted
Remove un-used import, utilize the default option of getattr
1 parent d732a3b commit 43d182e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

djangosaml2/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from defusedxml import ElementTree
1615
from django.conf import settings
1716

1817

1918
def get_custom_setting(name, default=None):
20-
if hasattr(settings, name):
21-
return getattr(settings, name)
22-
else:
23-
return default
19+
return getattr(settings, name, default)
2420

2521

2622
def available_idps(config, langpref=None):

0 commit comments

Comments
 (0)