mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
fix init .gam config dir
This commit is contained in:
BIN
src/.DS_Store
vendored
BIN
src/.DS_Store
vendored
Binary file not shown.
@@ -646,7 +646,7 @@ def doUpdateChromePolicy():
|
|||||||
elif vtype == 'TYPE_LIST':
|
elif vtype == 'TYPE_LIST':
|
||||||
value = value.split(',') if value else []
|
value = value.split(',') if value else []
|
||||||
elif vtype == 'TYPE_STRING' and convertCRsNLs:
|
elif vtype == 'TYPE_STRING' and convertCRsNLs:
|
||||||
value = _getMain().unescapeCRsNLs(value)
|
value = _getMain().un_getMain().escapeCRsNLs(value)
|
||||||
if myarg == 'chrome.users.chromebrowserupdates' and casedField == 'targetVersionPrefixSetting':
|
if myarg == 'chrome.users.chromebrowserupdates' and casedField == 'targetVersionPrefixSetting':
|
||||||
mg = CHROME_TARGET_VERSION_CHANNEL_MINUS_PATTERN.match(value)
|
mg = CHROME_TARGET_VERSION_CHANNEL_MINUS_PATTERN.match(value)
|
||||||
if mg:
|
if mg:
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ def doPrintCrOSDevices(entityList=None):
|
|||||||
csvPF.WriteRowNoFilter(row)
|
csvPF.WriteRowNoFilter(row)
|
||||||
return
|
return
|
||||||
if 'notes' in cros:
|
if 'notes' in cros:
|
||||||
cros['notes'] = escapeCRsNLs(cros['notes'])
|
cros['notes'] = _getMain().escapeCRsNLs(cros['notes'])
|
||||||
if addCSVData:
|
if addCSVData:
|
||||||
cros.update(addCSVData)
|
cros.update(addCSVData)
|
||||||
for cpuStatusReport in cros.get('cpuStatusReports', []):
|
for cpuStatusReport in cros.get('cpuStatusReports', []):
|
||||||
|
|||||||
@@ -1419,7 +1419,7 @@ def printShowMessagesThreads(users, entityType):
|
|||||||
if not convertCRNL:
|
if not convertCRNL:
|
||||||
row['Body'] = _getMessageBody(result['payload'])
|
row['Body'] = _getMessageBody(result['payload'])
|
||||||
else:
|
else:
|
||||||
row['Body'] = escapeCRsNLs(_getMessageBody(result['payload']))
|
row['Body'] = _getMain().escapeCRsNLs(_getMessageBody(result['payload']))
|
||||||
if show_attachments:
|
if show_attachments:
|
||||||
attachments = []
|
attachments = []
|
||||||
_getAttachments(result['id'], result['payload'], attachmentNamePattern, attachments)
|
_getAttachments(result['id'], result['payload'], attachmentNamePattern, attachments)
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ SMTPMSA_DISPLAY_FIELDS = ['host', 'port', 'securityMode']
|
|||||||
|
|
||||||
def _showSendAs(result, j, jcount, sigReplyFormat, verifyOnly=False):
|
def _showSendAs(result, j, jcount, sigReplyFormat, verifyOnly=False):
|
||||||
if sigReplyFormat == SIG_REPLY_TEMPLATE:
|
if sigReplyFormat == SIG_REPLY_TEMPLATE:
|
||||||
_getMain().writeStdout(f"{escapeCRsNLs(result.get('signature', 'None'))}\n")
|
_getMain().writeStdout(f"{_getMain().escapeCRsNLs(result.get('signature', 'None'))}\n")
|
||||||
return
|
return
|
||||||
if result['displayName']:
|
if result['displayName']:
|
||||||
_getMain().printEntity([Ent.SENDAS_ADDRESS, f'{result["displayName"]} <{result["sendAsEmail"]}>'], j, jcount)
|
_getMain().printEntity([Ent.SENDAS_ADDRESS, f'{result["displayName"]} <{result["sendAsEmail"]}>'], j, jcount)
|
||||||
|
|||||||
@@ -116,9 +116,9 @@ def _showVacation(user, i, count, result, showDisabled, sigReplyFormat):
|
|||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
else: # SIG_REPLY_COMPACT
|
else: # SIG_REPLY_COMPACT
|
||||||
if result.get('responseBodyPlainText'):
|
if result.get('responseBodyPlainText'):
|
||||||
_getMain().printKeyValueList(['Message', escapeCRsNLs(result['responseBodyPlainText'])])
|
_getMain().printKeyValueList(['Message', _getMain().escapeCRsNLs(result['responseBodyPlainText'])])
|
||||||
elif result.get('responseBodyHtml'):
|
elif result.get('responseBodyHtml'):
|
||||||
_getMain().printKeyValueList(['Message', escapeCRsNLs(result['responseBodyHtml'])])
|
_getMain().printKeyValueList(['Message', _getMain().escapeCRsNLs(result['responseBodyHtml'])])
|
||||||
else:
|
else:
|
||||||
_getMain().printKeyValueList(['Message', 'None'])
|
_getMain().printKeyValueList(['Message', 'None'])
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
@@ -222,11 +222,11 @@ def printShowVacation(users):
|
|||||||
row['subject'] = result.get('responseSubject', 'None')
|
row['subject'] = result.get('responseSubject', 'None')
|
||||||
if result.get('responseBodyPlainText'):
|
if result.get('responseBodyPlainText'):
|
||||||
row['html'] = False
|
row['html'] = False
|
||||||
row['message'] = escapeCRsNLs(result['responseBodyPlainText'])
|
row['message'] = _getMain().escapeCRsNLs(result['responseBodyPlainText'])
|
||||||
elif result.get('responseBodyHtml'):
|
elif result.get('responseBodyHtml'):
|
||||||
row['html'] = True
|
row['html'] = True
|
||||||
if sigReplyFormat == SIG_REPLY_HTML:
|
if sigReplyFormat == SIG_REPLY_HTML:
|
||||||
row['message'] = escapeCRsNLs(result['responseBodyHtml'])
|
row['message'] = _getMain().escapeCRsNLs(result['responseBodyHtml'])
|
||||||
else:
|
else:
|
||||||
row['message'] = result['responseBodyHtml'].replace('\r', '').replace('\n', '')
|
row['message'] = result['responseBodyHtml'].replace('\r', '').replace('\n', '')
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ def _showNote(note, j=0, jcount=0, FJQC=None, compact=False):
|
|||||||
_getMain().printKeyValueList([Ind.MultiLineText(body['text']['text'])])
|
_getMain().printKeyValueList([Ind.MultiLineText(body['text']['text'])])
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
else:
|
else:
|
||||||
_getMain().printKeyValueList(['text', escapeCRsNLs(body['text']['text'])])
|
_getMain().printKeyValueList(['text', _getMain().escapeCRsNLs(body['text']['text'])])
|
||||||
elif 'list' in body and 'listItems' in body['list']:
|
elif 'list' in body and 'listItems' in body['list']:
|
||||||
_showNoteListItems(body['list']['listItems'])
|
_showNoteListItems(body['list']['listItems'])
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
@@ -153,7 +153,7 @@ def createNote(users):
|
|||||||
def fixTextItem(item):
|
def fixTextItem(item):
|
||||||
if 'text' in item:
|
if 'text' in item:
|
||||||
if item['text']:
|
if item['text']:
|
||||||
item['text'] = unescapeCRsNLs(item['text'])
|
item['text'] = un_getMain().escapeCRsNLs(item['text'])
|
||||||
return
|
return
|
||||||
if missingTextValue:
|
if missingTextValue:
|
||||||
item['text'] = missingTextValue
|
item['text'] = missingTextValue
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ def doReport():
|
|||||||
if noAuthorizedApps:
|
if noAuthorizedApps:
|
||||||
continue
|
continue
|
||||||
for app in item['msgValue']:
|
for app in item['msgValue']:
|
||||||
appName = f'App: {escapeCRsNLs(app["client_name"])}'
|
appName = f'App: {_getMain().escapeCRsNLs(app["client_name"])}'
|
||||||
for key in ['num_users', 'client_id']:
|
for key in ['num_users', 'client_id']:
|
||||||
title = f'{appName}{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{key}'
|
title = f'{appName}{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{key}'
|
||||||
csvPF.AddTitles(title)
|
csvPF.AddTitles(title)
|
||||||
@@ -851,7 +851,7 @@ def doReport():
|
|||||||
app.update(addCSVData)
|
app.update(addCSVData)
|
||||||
for an_item in subitem:
|
for an_item in subitem:
|
||||||
if an_item == 'client_name':
|
if an_item == 'client_name':
|
||||||
app['name'] = f'App: {escapeCRsNLs(subitem[an_item])}'
|
app['name'] = f'App: {_getMain().escapeCRsNLs(subitem[an_item])}'
|
||||||
elif an_item == 'num_users':
|
elif an_item == 'num_users':
|
||||||
app['value'] = f'{subitem[an_item]} users'
|
app['value'] = f'{subitem[an_item]} users'
|
||||||
elif an_item == 'client_id':
|
elif an_item == 'client_id':
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import time
|
|||||||
import httplib2
|
import httplib2
|
||||||
import arrow
|
import arrow
|
||||||
|
|
||||||
from gamlib import glaction as Act
|
from gamlib import glaction
|
||||||
|
Act = glaction.GamAction()
|
||||||
from gamlib import glapi as API
|
from gamlib import glapi as API
|
||||||
from gamlib import glcfg as GC
|
from gamlib import glcfg as GC
|
||||||
from gamlib import glentity as Ent
|
from gamlib import glentity as Ent
|
||||||
|
|||||||
Reference in New Issue
Block a user