From c0f79a196d505565291c8444d4839c4c80f7c5e5 Mon Sep 17 00:00:00 2001 From: Wojciech Bartosiak Date: Mon, 15 Feb 2016 19:42:08 +0000 Subject: [PATCH] Fixed PEB8 warning about initialization and comparison to None --- oidc_provider/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oidc_provider/settings.py b/oidc_provider/settings.py index 0bae84b..2a67584 100644 --- a/oidc_provider/settings.py +++ b/oidc_provider/settings.py @@ -126,11 +126,12 @@ def get(name, import_str=False): """ Helper function to use inside the package. """ + value = None try: value = getattr(default_settings, name) value = getattr(settings, name) except AttributeError: - if value == None: + if value is None: raise Exception('You must set ' + name + ' in your settings.') value = import_from_str(value) if import_str else value