fix pylint error (unnecessary 'finally' clause may swallow exceptions unintentionally)

This commit is contained in:
Jeremy Rosenbaum 2015-08-06 14:35:03 +00:00 committed by Jeremy Rosenbaum
parent 5b5b4d8fe9
commit e1a7bb5e7b

View file

@ -2234,10 +2234,9 @@ class ClearFuncs(object):
break
except KeyError:
pass
finally:
if '*' not in eauth_users and token['name'] not in eauth_users and not group_auth_match:
log.warning('Authentication failure of type "token" occurred.')
return ''
if '*' not in eauth_users and token['name'] not in eauth_users and not group_auth_match:
log.warning('Authentication failure of type "token" occurred.')
return ''
# Compile list of authorized actions for the user
auth_list = []