From 1231627412a0f44f7645c063544973eb48bf4c0d Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 12 Oct 2023 12:33:14 -0700 Subject: [PATCH] More info chromeapp cleanup --- src/gam/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index aa243454..8922fd3d 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -27698,22 +27698,22 @@ CHROME_APPS_TYPE_CHOICES = ['android', 'chrome', 'web'] # gam info chromeapp android|chrome|web [formatjson] def doInfoChromeApp(): cm = buildGAPIObject(API.CHROMEMANAGEMENT_APPDETAILS) - mode = getChoice(CHROME_APPS_TYPE_CHOICES) + app_type = getChoice(CHROME_APPS_TYPE_CHOICES) app_id = getString(Cmd.OB_APP_ID) FJQC = FormatJSONQuoteChar() while Cmd.ArgumentsRemaining(): myarg = getArgument() FJQC.GetFormatJSON(myarg) - if mode == 'chrome': + if app_type == 'chrome': service = cm.customers().apps().chrome() - elif mode == 'android': + elif app_type == 'android': service = cm.customers().apps().android() else: service = cm.customers().apps().web() try: appDetails = callGAPI(service, 'get', throwReasons=[GAPI.BAD_REQUEST, GAPI.NOT_FOUND, GAPI.FORBIDDEN], - name=f'customers/{GC.Values[GC.CUSTOMER_ID]}/apps/{mode}/{app_id}') + name=f'customers/{GC.Values[GC.CUSTOMER_ID]}/apps/{app_type}/{app_id}') if FJQC.formatJSON: printLine(json.dumps(cleanJSON(appDetails), ensure_ascii=False, sort_keys=True)) return @@ -27722,7 +27722,7 @@ def doInfoChromeApp(): showJSON(None, appDetails, timeObjects=CHROME_APPS_TIME_OBJECTS) Ind.Decrement() except (GAPI.badRequest, GAPI.notFound, GAPI.forbidden): - checkEntityAFDNEorAccessErrorExit(None, Ent.CHROME_APP, app_id) + checkEntityAFDNEorAccessErrorExit(None, Ent.CHROME_APP, f'{app_type}/{app_id}') def _getPrintChromeGetting(subou, pfilter, entityType): orgUnitPath = subou[0]