gam7 7.18.5__py3-none-any.whl → 7.18.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gam/__init__.py +22 -12
- gam/gamlib/glmsgs.py +1 -0
- {gam7-7.18.5.dist-info → gam7-7.18.7.dist-info}/METADATA +1 -1
- {gam7-7.18.5.dist-info → gam7-7.18.7.dist-info}/RECORD +7 -7
- {gam7-7.18.5.dist-info → gam7-7.18.7.dist-info}/WHEEL +0 -0
- {gam7-7.18.5.dist-info → gam7-7.18.7.dist-info}/entry_points.txt +0 -0
- {gam7-7.18.5.dist-info → gam7-7.18.7.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.18.
|
|
28
|
+
__version__ = '7.18.07'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -44905,12 +44905,17 @@ def getUserLicenses(lic, user, skus):
|
|
|
44905
44905
|
if exception is None:
|
|
44906
44906
|
if response and 'skuId' in response:
|
|
44907
44907
|
licenses.append(response['skuId'])
|
|
44908
|
-
del
|
|
44908
|
+
del sku_calls[request_id]
|
|
44909
44909
|
else:
|
|
44910
|
-
|
|
44911
|
-
|
|
44910
|
+
_, reason, _ = checkGAPIError(exception, softErrors=True)
|
|
44911
|
+
reasons_to_quit = [
|
|
44912
|
+
GAPI.ACCESS_NOT_CONFIGURED, # license API not turned on
|
|
44913
|
+
GAPI.PERMISSION_DENIED, # Admin doesn't have rights to license assignments
|
|
44914
|
+
GAPI.NOT_FOUND # API call succeeded, user does not have this license
|
|
44915
|
+
]
|
|
44916
|
+
if reason in reasons_to_quit:
|
|
44917
|
+
del sku_calls[request_id]
|
|
44912
44918
|
|
|
44913
|
-
not_found = 'User does not have a license for specified sku and product'
|
|
44914
44919
|
licenses = []
|
|
44915
44920
|
svcargs = dict([('userId', user['primaryEmail']), ('productId', None), ('skuId', None), ('fields', 'skuId')]+GM.Globals[GM.EXTRA_ARGS_LIST])
|
|
44916
44921
|
method = getattr(lic.licenseAssignments(), 'get')
|
|
@@ -58308,11 +58313,11 @@ def printShowDrivelastModifications(users):
|
|
|
58308
58313
|
DLP.Finalize(fileIdEntity)
|
|
58309
58314
|
if csvPF:
|
|
58310
58315
|
sortTitles = ['User', 'id', 'name'] if fileIdEntity.get('shareddrive') else ['User']
|
|
58316
|
+
if addCSVData:
|
|
58317
|
+
sortTitles.extend(sorted(addCSVData.keys()))
|
|
58311
58318
|
sortTitles.extend(['lastModifiedFileId', 'lastModifiedFileName',
|
|
58312
58319
|
'lastModifiedFileMimeType', 'lastModifiedFilePath',
|
|
58313
58320
|
'lastModifyingUser', 'lastModifiedTime'])
|
|
58314
|
-
if addCSVData:
|
|
58315
|
-
sortTitles.extend(sorted(addCSVData.keys()))
|
|
58316
58321
|
csvPF.SetTitles(sortTitles)
|
|
58317
58322
|
csvPF.SetSortAllTitles()
|
|
58318
58323
|
pagesFields = getItemFieldsFromFieldsList('files', fieldsList)
|
|
@@ -71292,7 +71297,7 @@ def _processMessagesThreads(users, entityType):
|
|
|
71292
71297
|
try:
|
|
71293
71298
|
callGAPI(gmail.users().messages(), function,
|
|
71294
71299
|
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID_MESSAGE_ID, GAPI.INVALID, GAPI.INVALID_ARGUMENT,
|
|
71295
|
-
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED],
|
|
71300
|
+
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED, GAPI.QUOTA_EXCEEDED],
|
|
71296
71301
|
userId='me', body=body)
|
|
71297
71302
|
for messageId in body['ids']:
|
|
71298
71303
|
mcount += 1
|
|
@@ -71302,7 +71307,7 @@ def _processMessagesThreads(users, entityType):
|
|
|
71302
71307
|
csvPF.WriteRow({'User': user, entityHeader: messageId, 'action': Act.Performed()})
|
|
71303
71308
|
except GAPI.serviceNotAvailable:
|
|
71304
71309
|
mcount += bcount
|
|
71305
|
-
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
71310
|
+
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied, GAPI.quotaExceeded) as e:
|
|
71306
71311
|
_processMessageFailed(user, idsList, f'{str(e)} ({mcount+1}-{mcount+bcount}/{jcount})')
|
|
71307
71312
|
mcount += bcount
|
|
71308
71313
|
except GAPI.invalidMessageId:
|
|
@@ -71315,7 +71320,8 @@ def _processMessagesThreads(users, entityType):
|
|
|
71315
71320
|
|
|
71316
71321
|
_GMAIL_ERROR_REASON_TO_MESSAGE_MAP = {GAPI.NOT_FOUND: Msg.DOES_NOT_EXIST,
|
|
71317
71322
|
GAPI.INVALID_MESSAGE_ID: Msg.INVALID_MESSAGE_ID,
|
|
71318
|
-
GAPI.FAILED_PRECONDITION: Msg.FAILED_PRECONDITION
|
|
71323
|
+
GAPI.FAILED_PRECONDITION: Msg.FAILED_PRECONDITION,
|
|
71324
|
+
GAPI.QUOTA_EXCEEDED: Msg.QUOTA_EXCEEDED}
|
|
71319
71325
|
|
|
71320
71326
|
def _callbackProcessMessage(request_id, _, exception):
|
|
71321
71327
|
ri = request_id.splitlines()
|
|
@@ -71326,7 +71332,9 @@ def _processMessagesThreads(users, entityType):
|
|
|
71326
71332
|
csvPF.WriteRow({'User': ri[RI_ENTITY], entityHeader: ri[RI_ITEM], 'action': Act.Performed()})
|
|
71327
71333
|
else:
|
|
71328
71334
|
http_status, reason, message = checkGAPIError(exception)
|
|
71329
|
-
_processMessageFailed(ri[RI_ENTITY], ri[RI_ITEM],
|
|
71335
|
+
_processMessageFailed(ri[RI_ENTITY], ri[RI_ITEM],
|
|
71336
|
+
getHTTPError(_GMAIL_ERROR_REASON_TO_MESSAGE_MAP, http_status, reason, message),
|
|
71337
|
+
int(ri[RI_J]), int(ri[RI_JCOUNT]))
|
|
71330
71338
|
|
|
71331
71339
|
def _batchProcessMessagesThreads(service, function, user, jcount, messageIds, **kwargs):
|
|
71332
71340
|
svcargs = dict([('userId', 'me'), ('id', None), ('fields', '')]+list(kwargs.items())+GM.Globals[GM.EXTRA_ARGS_LIST])
|
|
@@ -71424,7 +71432,9 @@ def _processMessagesThreads(users, entityType):
|
|
|
71424
71432
|
continue
|
|
71425
71433
|
if parameters['messageEntity'] is None:
|
|
71426
71434
|
if parameters['maxToProcess'] and jcount > parameters['maxToProcess']:
|
|
71427
|
-
entityNumEntitiesActionNotPerformedWarning([Ent.USER, user], entityType, jcount,
|
|
71435
|
+
entityNumEntitiesActionNotPerformedWarning([Ent.USER, user], entityType, jcount,
|
|
71436
|
+
Msg.COUNT_N_EXCEEDS_MAX_TO_PROCESS_M.format(jcount, Act.ToPerform(), parameters['maxToProcess']),
|
|
71437
|
+
i, count)
|
|
71428
71438
|
continue
|
|
71429
71439
|
if not parameters['doIt']:
|
|
71430
71440
|
entityNumEntitiesActionNotPerformedWarning([Ent.USER, user], entityType, jcount, Msg.USE_DOIT_ARGUMENT_TO_PERFORM_ACTION, i, count)
|
gam/gamlib/glmsgs.py
CHANGED
|
@@ -465,6 +465,7 @@ PROCESSING_ITEM_N = '{0},0,Processing item {1}\n'
|
|
|
465
465
|
PROCESSING_ITEM_N_OF_M = '{0},0,Processing item {1}/{2}\n'
|
|
466
466
|
PROFILE_PHOTO_NOT_FOUND = 'Profile photo not found'
|
|
467
467
|
PROFILE_PHOTO_IS_DEFAULT = 'Profile photo is default'
|
|
468
|
+
QUOTA_EXCEEDED = 'Quota exceeded'
|
|
468
469
|
REASON_ONLY_VALID_WITH_CONTENTRESTRICTIONS_READONLY_TRUE = 'reason only valid with contentrestrictions readonly true'
|
|
469
470
|
REAUTHENTICATION_IS_NEEDED = 'Reauthentication is needed, please run\n\ngam oauth create'
|
|
470
471
|
RECOMMEND_RUNNING_GAM_ROTATE_SAKEY = 'Recommend running "gam rotate sakey" to get a new key\n'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=atub7c8uKUikbdJWxNf8X6b25PxCkfIIn56c3OO1ykE,3584006
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -31,7 +31,7 @@ gam/gamlib/glgapi.py,sha256=pdBbwNtnCwFWxJGaP-_3hdTjSNoOCJF2yo76WdQOi1k,40426
|
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=J0xcHggVrUBzHJ5GruenKV-qV1zPKcK2qWgAgN3i5Jw,9608
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
34
|
-
gam/gamlib/glmsgs.py,sha256=
|
|
34
|
+
gam/gamlib/glmsgs.py,sha256=vephDvTNbv55f79QzZWEKDcBTXr8knrwDxvx-1TYM6M,33997
|
|
35
35
|
gam/gamlib/glskus.py,sha256=e1u3zw1MGQjBgAFXqjrGWQl2d7eYpVlMYGpIKNwjskQ,15360
|
|
36
36
|
gam/gamlib/gluprop.py,sha256=IyPLCyvn7-NHTUenM71YPQPXRZXx6CB5q-GtJ-FYd1c,11461
|
|
37
37
|
gam/gamlib/glverlibs.py,sha256=xoQXiwcE_-HVYKv-VYA8O0mazRsc9mN-_ysj1dAlMyc,992
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.18.
|
|
69
|
-
gam7-7.18.
|
|
70
|
-
gam7-7.18.
|
|
71
|
-
gam7-7.18.
|
|
72
|
-
gam7-7.18.
|
|
68
|
+
gam7-7.18.7.dist-info/METADATA,sha256=g_A8aIoSjWA76SA2SnuphAvL2w5WxTss4j_-5E6E2v4,2940
|
|
69
|
+
gam7-7.18.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.18.7.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.18.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.18.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|