gam7 7.5.19__py3-none-any.whl → 7.5.20__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.
Potentially problematic release.
This version of gam7 might be problematic. Click here for more details.
- gam/__init__.py +19 -21
- gam/gamlib/glclargs.py +1 -0
- gam/gamlib/glmsgs.py +0 -1
- {gam7-7.5.19.dist-info → gam7-7.5.20.dist-info}/METADATA +1 -1
- {gam7-7.5.19.dist-info → gam7-7.5.20.dist-info}/RECORD +8 -8
- {gam7-7.5.19.dist-info → gam7-7.5.20.dist-info}/WHEEL +0 -0
- {gam7-7.5.19.dist-info → gam7-7.5.20.dist-info}/entry_points.txt +0 -0
- {gam7-7.5.19.dist-info → gam7-7.5.20.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.05.
|
|
28
|
+
__version__ = '7.05.20'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -1723,6 +1723,16 @@ def getREPattern(flags=0):
|
|
|
1723
1723
|
return validateREPattern(patstr, flags)
|
|
1724
1724
|
missingArgumentExit(Cmd.OB_RE_PATTERN)
|
|
1725
1725
|
|
|
1726
|
+
def getREPatternReplacement(flags=0):
|
|
1727
|
+
pattern = getREPattern(flags)
|
|
1728
|
+
replacement = getString(Cmd.OB_STRING, minLen=0)
|
|
1729
|
+
try:
|
|
1730
|
+
re.sub(pattern, replacement, '')
|
|
1731
|
+
return (pattern, replacement)
|
|
1732
|
+
except re.error as e:
|
|
1733
|
+
Cmd.Backup()
|
|
1734
|
+
usageErrorExit(f'{Cmd.OB_RE_REPLACEMENT} {Msg.ERROR}: {e}')
|
|
1735
|
+
|
|
1726
1736
|
def getSheetEntity(allowBlankSheet):
|
|
1727
1737
|
if Cmd.ArgumentsRemaining():
|
|
1728
1738
|
sheet = Cmd.Current()
|
|
@@ -14521,7 +14531,7 @@ def _getTagReplacement(myarg, tagReplacements, allowSubs):
|
|
|
14521
14531
|
if myarg == 'replace':
|
|
14522
14532
|
trregex = None
|
|
14523
14533
|
elif myarg == 'replaceregex':
|
|
14524
|
-
trregex = (
|
|
14534
|
+
trregex = getREPatternReplacement(re.IGNORECASE)
|
|
14525
14535
|
else:
|
|
14526
14536
|
return False
|
|
14527
14537
|
matchTag = getString(Cmd.OB_TAG)
|
|
@@ -14600,10 +14610,7 @@ def _getTagReplacement(myarg, tagReplacements, allowSubs):
|
|
|
14600
14610
|
if trregex is None:
|
|
14601
14611
|
tagReplacements['tags'][matchTag] = {'value': matchReplacement}
|
|
14602
14612
|
else:
|
|
14603
|
-
|
|
14604
|
-
tagReplacements['tags'][matchTag] = {'value': re.sub(trregex[0], trregex[1], matchReplacement)}
|
|
14605
|
-
except re.error as e:
|
|
14606
|
-
systemErrorExit(ACTION_FAILED_RC, Msg.REGEX_REPLACEMENT_ERROR.format(trregex[1], str(e)))
|
|
14613
|
+
tagReplacements['tags'][matchTag] = {'value': re.sub(trregex[0], trregex[1], matchReplacement)}
|
|
14607
14614
|
return True
|
|
14608
14615
|
|
|
14609
14616
|
def _getTagReplacementFieldValues(user, i, count, tagReplacements, results=None):
|
|
@@ -14688,10 +14695,7 @@ def _getTagReplacementFieldValues(user, i, count, tagReplacements, results=None)
|
|
|
14688
14695
|
tag['value'] = _substituteForUser(tag['template'], user, userName)
|
|
14689
14696
|
trregex = tag.get('trregex', None)
|
|
14690
14697
|
if trregex is not None:
|
|
14691
|
-
|
|
14692
|
-
tag['value'] = re.sub(trregex[0], trregex[1], tag['value'])
|
|
14693
|
-
except re.error as e:
|
|
14694
|
-
systemErrorExit(ACTION_FAILED_RC, Msg.REGEX_REPLACEMENT_ERROR.format(trregex[1], str(e)))
|
|
14698
|
+
tag['value'] = re.sub(trregex[0], trregex[1], tag['value'])
|
|
14695
14699
|
|
|
14696
14700
|
RTL_PATTERN = re.compile(r'(?s){RTL}.*?{/RTL}')
|
|
14697
14701
|
RT_PATTERN = re.compile(r'(?s){RT}.*?{/RT}')
|
|
@@ -38560,7 +38564,7 @@ def _getCalendarEventAttribute(myarg, body, parameters, function):
|
|
|
38560
38564
|
elif myarg == 'description':
|
|
38561
38565
|
body['description'] = getStringWithCRsNLs()
|
|
38562
38566
|
elif function == 'update' and myarg == 'replacedescription':
|
|
38563
|
-
parameters['replaceDescription'].append((
|
|
38567
|
+
parameters['replaceDescription'].append(getREPatternReplacement(re.IGNORECASE))
|
|
38564
38568
|
elif myarg == 'location':
|
|
38565
38569
|
body['location'] = getString(Cmd.OB_STRING, minLen=0)
|
|
38566
38570
|
elif myarg == 'source':
|
|
@@ -39109,10 +39113,7 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE
|
|
|
39109
39113
|
if 'description' in updateFieldList and 'description' in event:
|
|
39110
39114
|
body['description'] = event['description']
|
|
39111
39115
|
for replacement in parameters['replaceDescription']:
|
|
39112
|
-
|
|
39113
|
-
body['description'] = re.sub(replacement[0], replacement[1], body['description'])
|
|
39114
|
-
except re.error as e:
|
|
39115
|
-
systemErrorExit(ACTION_FAILED_RC, Msg.REGEX_REPLACEMENT_ERROR.format(replacement[1], str(e)))
|
|
39116
|
+
body['description'] = re.sub(replacement[0], replacement[1], body['description'])
|
|
39116
39117
|
if 'attendees' in updateFieldList:
|
|
39117
39118
|
if not parameters['clearAttendees']:
|
|
39118
39119
|
if 'attendees' in event:
|
|
@@ -52835,7 +52836,7 @@ def getDriveFileAttribute(myarg, body, parameters, updateCmd):
|
|
|
52835
52836
|
elif myarg =='stripnameprefix':
|
|
52836
52837
|
parameters[DFA_STRIPNAMEPREFIX] = getString(Cmd.OB_STRING, minLen=0)
|
|
52837
52838
|
elif myarg == 'replacefilename':
|
|
52838
|
-
parameters[DFA_REPLACEFILENAME].append((
|
|
52839
|
+
parameters[DFA_REPLACEFILENAME].append(getREPatternReplacement(re.IGNORECASE))
|
|
52839
52840
|
elif myarg in {'convert', 'ocr'}:
|
|
52840
52841
|
deprecatedArgument(myarg)
|
|
52841
52842
|
stderrWarningMsg(Msg.USE_MIMETYPE_TO_SPECIFY_GOOGLE_FORMAT)
|
|
@@ -57380,10 +57381,7 @@ def writeReturnIdLink(returnIdLink, mimeType, result):
|
|
|
57380
57381
|
|
|
57381
57382
|
def processFilenameReplacements(name, replacements):
|
|
57382
57383
|
for replacement in replacements:
|
|
57383
|
-
|
|
57384
|
-
name = re.sub(replacement[0], replacement[1], name)
|
|
57385
|
-
except re.error as e:
|
|
57386
|
-
systemErrorExit(ACTION_FAILED_RC, Msg.REGEX_REPLACEMENT_ERROR.format(replacement[1], str(e)))
|
|
57384
|
+
name = re.sub(replacement[0], replacement[1], name)
|
|
57387
57385
|
return name
|
|
57388
57386
|
|
|
57389
57387
|
def addTimestampToFilename(parameters, body):
|
|
@@ -58395,7 +58393,7 @@ def getCopyMoveOptions(myarg, copyMoveOptions):
|
|
|
58395
58393
|
elif myarg =='stripnameprefix':
|
|
58396
58394
|
copyMoveOptions['stripNamePrefix'] = getString(Cmd.OB_STRING, minLen=0)
|
|
58397
58395
|
elif myarg == 'replacefilename':
|
|
58398
|
-
copyMoveOptions['replaceFilename'].append((
|
|
58396
|
+
copyMoveOptions['replaceFilename'].append(getREPatternReplacement(re.IGNORECASE))
|
|
58399
58397
|
elif myarg == 'showpermissionmessages':
|
|
58400
58398
|
copyMoveOptions['showPermissionMessages'] = getBoolean()
|
|
58401
58399
|
elif myarg == 'sendemailifrequired':
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -991,6 +991,7 @@ class GamCLArgs():
|
|
|
991
991
|
OB_RESOURCE_ENTITY = 'ResourceEntity'
|
|
992
992
|
OB_RESOURCE_ID = 'ResourceID'
|
|
993
993
|
OB_RE_PATTERN = 'REPattern'
|
|
994
|
+
OB_RE_REPLACEMENT = 'REReplacement'
|
|
994
995
|
OB_ROLE_ASSIGNMENT_ID = 'RoleAssignmentID'
|
|
995
996
|
OB_ROLE_ITEM = 'RoleItem'
|
|
996
997
|
OB_ROLE_LIST = 'RoleList'
|
gam/gamlib/glmsgs.py
CHANGED
|
@@ -465,7 +465,6 @@ REASON_ONLY_VALID_WITH_CONTENTRESTRICTIONS_READONLY_TRUE = 'reason only valid wi
|
|
|
465
465
|
REAUTHENTICATION_IS_NEEDED = 'Reauthentication is needed, please run\n\ngam oauth create'
|
|
466
466
|
RECOMMEND_RUNNING_GAM_ROTATE_SAKEY = 'Recommend running "gam rotate sakey" to get a new key\n'
|
|
467
467
|
REFUSING_TO_DEPROVISION_DEVICES = 'Refusing to deprovision {0} devices because acknowledge_device_touch_requirement not specified.\nDeprovisioning a device means the device will have to be physically wiped and re-enrolled to be managed by your domain again.\nThis requires physical access to the device and is very time consuming to perform for each device.\nPlease add "acknowledge_device_touch_requirement" to the GAM command if you understand this and wish to proceed with the deprovision.\nPlease also be aware that deprovisioning can have an effect on your device license count.\nSee https://support.google.com/chrome/a/answer/3523633 for full details.'
|
|
468
|
-
REGEX_REPLACEMENT_ERROR = 'Regular expression replacement string "{0}" error: {1}'
|
|
469
468
|
REPLY_TO_CUSTOM_REQUIRES_EMAIL_ADDRESS = 'replyto REPLY_TO_CUSTOM requires customReplyTo <EmailAddress>'
|
|
470
469
|
REQUEST_COMPLETED_NO_FILES = 'Request completed but no results/files were returned, try requesting again'
|
|
471
470
|
REQUEST_NOT_COMPLETE = 'Request needs to be completed before downloading, current status is: {0}'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=NbIk_4F9WWuSc0_BEPwF0E8ULPbmv5kaSeSSx093gAg,3484715
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -25,13 +25,13 @@ gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
26
|
gam/gamlib/glapi.py,sha256=EAQXkaM13t6jjh9vL4eHJqIZRI5kmzeneiFs5xcWXfg,34304
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=cV011FpIWge4oi5_dJrdof66vUqX6UCvTGWWTNVmYEg,28055
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=Dg7xs3Hca8uK_UimbYtp7eVQJcBZwoE1HD7aJr0lEk8,42238
|
|
29
29
|
gam/gamlib/glentity.py,sha256=ZLbyMl9NhN-MBf9Rxmho2dBYeS4SNLMctpeaKFZSbQ4,33801
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=49PPbxiW6EpPE4E8fAlLMx1mSMcQra1zwi-CSXPa7rk,38473
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=Y73xM1RNhIbtcqnMv1gcZF3wDWOeLWW-7SvoQyWw6tA,9659
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
34
|
-
gam/gamlib/glmsgs.py,sha256=
|
|
34
|
+
gam/gamlib/glmsgs.py,sha256=fUEwnzJsyThJDgrqslhXFLp7Ah_5e3VuyGNWAJKRi5o,33260
|
|
35
35
|
gam/gamlib/glskus.py,sha256=Gi0jjrSGwhCD4SvtqQfuAXwtEiL2zU4c8qXdxO1yY9k,15058
|
|
36
36
|
gam/gamlib/gluprop.py,sha256=IyPLCyvn7-NHTUenM71YPQPXRZXx6CB5q-GtJ-FYd1c,11461
|
|
37
37
|
gam/gamlib/glverlibs.py,sha256=XXYhmjOVti78JTy7NNr4ShIwiOX7LrfrmFSlqSWixrE,1077
|
|
@@ -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.5.
|
|
69
|
-
gam7-7.5.
|
|
70
|
-
gam7-7.5.
|
|
71
|
-
gam7-7.5.
|
|
72
|
-
gam7-7.5.
|
|
68
|
+
gam7-7.5.20.dist-info/METADATA,sha256=fk08OrftIsKQs3iBss-u12mACP2-Wc7M4IQ76sq3jfA,2889
|
|
69
|
+
gam7-7.5.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.5.20.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.5.20.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.5.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|