Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
Fix some pep8 issues
  • Loading branch information
puiterwijk committed Sep 14, 2015
1 parent 3d3c478 commit 82c75511265e9b44b09739b81513c08db67b15b9
Showing 1 changed file with 10 additions and 6 deletions.
@@ -104,6 +104,7 @@ def softint(x):
except (ValueError, TypeError):
return None

def isstring(x):
if sys.version_info[0] >= 3:
return isinstance(x, str)
@@ -393,7 +394,7 @@ def _default_store_factory(self):
from warnings import warn
warn(DeprecationWarning('init_app not called for this '
'application. This is deprecated functionality'))
'application. This is deprecated functionality'))

path = app.config['OPENID_FS_STORE_PATH'] or self.fs_store_path
if path is None:
@@ -420,7 +421,8 @@ def get_next_url(self):
return (
self.check_safe_root(request.values.get('next')) or
self.check_safe_root(request.referrer) or
(self.fallback_endpoint and self.check_safe_root(url_for(self.fallback_endpoint))) or
(self.fallback_endpoint and
self.check_safe_root(url_for(self.fallback_endpoint))) or

@@ -457,7 +459,8 @@ def attach_reg_info(self, auth_request, keys, optional_keys):
optional_keys = set(optional_keys or [])
sreg_keys = list(SREG_KEYS & keys)
sreg_optional_keys = list(SREG_KEYS & optional_keys)
auth_request.addExtension(SRegRequest(required=sreg_keys, optional=sreg_optional_keys))
ax_req = ax.FetchRequest()
for key in (keys | optional_keys):
for uri in AX_MAPPING.get(key, ()):
@@ -506,14 +509,14 @@ def decorated(*args, **kwargs):
self.signal_error(u'The request was cancelled')
elif openid_response.status == FAILURE:
self.signal_error(u'OpenID authentication failure. Mesage: %s'
% openid_response.message)
% openid_response.message)
elif openid_response.status == SETUP_NEEDED:
# Unless immediate=True, we should never get here
self.signal_error(u'OpenID setup was needed')
# We should also never get here, as this should be exhaustive
self.signal_error(u'OpenID authentication weird state: %s' %
return redirect(self.get_current_url())
return decorated

@@ -538,7 +541,8 @@ def try_login(self, identity_url, ask_for=None, ask_for_optional=None,
`immediate` can be used to indicate this request should be a so-called
checkid_immediate request, resulting in the provider not showing any UI.
checkid_immediate request, resulting in the provider not showing any
Note that this adds a new possible response: SetupNeeded, which is the
server saying it doesn't have enough information yet to authorized or
reject the authentication (probably, the user needs to sign in or

0 comments on commit 82c7551

Please sign in to comment.