mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
Fix UnboundLocalError in oauth.py: remove Cmd=Cmd self-assignments
This commit is contained in:
@@ -659,7 +659,6 @@ def doOAuthRequest(currentScopes, login_hint, verifyScopes=False):
|
|||||||
# gam oauth|oauth2 create|request [<EmailAddress>]
|
# gam oauth|oauth2 create|request [<EmailAddress>]
|
||||||
# gam oauth|oauth2 create|request [admin <EmailAddress>] [scope|scopes <APIScopeURLList>]
|
# gam oauth|oauth2 create|request [admin <EmailAddress>] [scope|scopes <APIScopeURLList>]
|
||||||
def doOAuthCreate():
|
def doOAuthCreate():
|
||||||
Cmd = Cmd
|
|
||||||
if not Cmd.PeekArgumentPresent(['admin', 'scope', 'scopes']):
|
if not Cmd.PeekArgumentPresent(['admin', 'scope', 'scopes']):
|
||||||
login_hint = getEmailAddress(noUid=True, optional=True)
|
login_hint = getEmailAddress(noUid=True, optional=True)
|
||||||
scopes = None
|
scopes = None
|
||||||
@@ -729,8 +728,6 @@ def doOAuthDelete():
|
|||||||
|
|
||||||
# gam oauth|oauth2 info|verify [showsecret] [accesstoken <AccessToken> idtoken <IDToken>] [showdetails]
|
# gam oauth|oauth2 info|verify [showsecret] [accesstoken <AccessToken> idtoken <IDToken>] [showdetails]
|
||||||
def doOAuthInfo():
|
def doOAuthInfo():
|
||||||
Cmd = Cmd
|
|
||||||
Ind = Ind
|
|
||||||
credentials = access_token = id_token = None
|
credentials = access_token = id_token = None
|
||||||
showDetails = showSecret = False
|
showDetails = showSecret = False
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
@@ -781,7 +778,6 @@ def doOAuthInfo():
|
|||||||
# gam oauth|oauth2 update [<EmailAddress>]
|
# gam oauth|oauth2 update [<EmailAddress>]
|
||||||
# gam oauth|oauth2 update [admin <EmailAddress>]
|
# gam oauth|oauth2 update [admin <EmailAddress>]
|
||||||
def doOAuthUpdate():
|
def doOAuthUpdate():
|
||||||
Cmd = Cmd
|
|
||||||
if Cmd.PeekArgumentPresent(['admin']):
|
if Cmd.PeekArgumentPresent(['admin']):
|
||||||
Cmd.Advance()
|
Cmd.Advance()
|
||||||
login_hint = getEmailAddress(noUid=True)
|
login_hint = getEmailAddress(noUid=True)
|
||||||
@@ -818,7 +814,6 @@ def doOAuthRefresh():
|
|||||||
|
|
||||||
# gam oauth|oauth2 export [<FileName>]
|
# gam oauth|oauth2 export [<FileName>]
|
||||||
def doOAuthExport():
|
def doOAuthExport():
|
||||||
Cmd = Cmd
|
|
||||||
if Cmd.ArgumentsRemaining():
|
if Cmd.ArgumentsRemaining():
|
||||||
filename = getString(Cmd.OB_FILE_NAME)
|
filename = getString(Cmd.OB_FILE_NAME)
|
||||||
checkForExtraneousArguments()
|
checkForExtraneousArguments()
|
||||||
|
|||||||
Reference in New Issue
Block a user