gam7 7.17.0__py3-none-any.whl → 7.17.2__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 +22 -9
- {gam7-7.17.0.dist-info → gam7-7.17.2.dist-info}/METADATA +1 -1
- {gam7-7.17.0.dist-info → gam7-7.17.2.dist-info}/RECORD +6 -6
- {gam7-7.17.0.dist-info → gam7-7.17.2.dist-info}/WHEEL +0 -0
- {gam7-7.17.0.dist-info → gam7-7.17.2.dist-info}/entry_points.txt +0 -0
- {gam7-7.17.0.dist-info → gam7-7.17.2.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.17.
|
|
28
|
+
__version__ = '7.17.02'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -5688,19 +5688,22 @@ def getUserEmailFromID(uid, cd):
|
|
|
5688
5688
|
try:
|
|
5689
5689
|
result = callGAPI(cd.users(), 'get',
|
|
5690
5690
|
throwReasons=GAPI.USER_GET_THROW_REASONS,
|
|
5691
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
5691
5692
|
userKey=uid, fields='primaryEmail')
|
|
5692
5693
|
return result.get('primaryEmail')
|
|
5693
5694
|
except (GAPI.userNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden,
|
|
5694
|
-
GAPI.badRequest, GAPI.backendError, GAPI.systemError):
|
|
5695
|
+
GAPI.badRequest, GAPI.backendError, GAPI.systemError, GAPI.serviceNotAvailable):
|
|
5695
5696
|
return None
|
|
5696
5697
|
|
|
5697
5698
|
def getGroupEmailFromID(uid, cd):
|
|
5698
5699
|
try:
|
|
5699
5700
|
result = callGAPI(cd.groups(), 'get',
|
|
5700
5701
|
throwReasons=GAPI.GROUP_GET_THROW_REASONS,
|
|
5702
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
5701
5703
|
groupKey=uid, fields='email')
|
|
5702
5704
|
return result.get('email')
|
|
5703
|
-
except (GAPI.groupNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden,
|
|
5705
|
+
except (GAPI.groupNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden,
|
|
5706
|
+
GAPI.badRequest, GAPI.serviceNotAvailable):
|
|
5704
5707
|
return None
|
|
5705
5708
|
|
|
5706
5709
|
def getServiceAccountEmailFromID(account_id, sal=None):
|
|
@@ -46963,8 +46966,8 @@ def doCreateSiteVerification():
|
|
|
46963
46966
|
printKeyValueList(['Meta HTML Header Data', webserver_meta_record['token']])
|
|
46964
46967
|
printBlankLine()
|
|
46965
46968
|
|
|
46966
|
-
def _showSiteVerificationInfo(site):
|
|
46967
|
-
|
|
46969
|
+
def _showSiteVerificationInfo(site, i=0, count=0):
|
|
46970
|
+
printKeyValueListWithCount(['Site', site['site']['identifier']], i, count)
|
|
46968
46971
|
Ind.Increment()
|
|
46969
46972
|
printKeyValueList(['ID', unquote(site['id'])])
|
|
46970
46973
|
printKeyValueList(['Type', site['site']['type']])
|
|
@@ -47072,8 +47075,11 @@ def doInfoSiteVerification():
|
|
|
47072
47075
|
checkForExtraneousArguments()
|
|
47073
47076
|
sites = callGAPIitems(verif.webResource(), 'list', 'items')
|
|
47074
47077
|
if sites:
|
|
47078
|
+
count = len(sites)
|
|
47079
|
+
i = 0
|
|
47075
47080
|
for site in sorted(sites, key=lambda k: (k['site']['type'], k['site']['identifier'])):
|
|
47076
|
-
|
|
47081
|
+
i += 1
|
|
47082
|
+
_showSiteVerificationInfo(site, i, count)
|
|
47077
47083
|
else:
|
|
47078
47084
|
printKeyValueList(['No Sites Verified.'])
|
|
47079
47085
|
|
|
@@ -47101,7 +47107,7 @@ def printShowWebResources(users):
|
|
|
47101
47107
|
j = 0
|
|
47102
47108
|
for site in sorted(sites, key=lambda k: (k['site']['type'], k['site']['identifier'])):
|
|
47103
47109
|
j += 1
|
|
47104
|
-
_showSiteVerificationInfo(site)
|
|
47110
|
+
_showSiteVerificationInfo(site, j, jcount)
|
|
47105
47111
|
Ind.Decrement()
|
|
47106
47112
|
else:
|
|
47107
47113
|
for site in sites:
|
|
@@ -47126,7 +47132,11 @@ def printShowWebMasterSites(users):
|
|
|
47126
47132
|
user, searchconsole = buildGAPIServiceObject(API.SEARCHCONSOLE, user, i, count)
|
|
47127
47133
|
if not searchconsole:
|
|
47128
47134
|
continue
|
|
47129
|
-
|
|
47135
|
+
try:
|
|
47136
|
+
sites = callGAPIitems(searchconsole.sites(), 'list', 'siteEntry',
|
|
47137
|
+
throwReasons=[GAPI.PERMISSION_DENIED])
|
|
47138
|
+
except GAPI.permissionDenied as e:
|
|
47139
|
+
accessErrorExitNonDirectory(API.SEARCHCONSOLE, str(e))
|
|
47130
47140
|
jcount = len(sites)
|
|
47131
47141
|
if not csvPF:
|
|
47132
47142
|
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.WEB_MASTERSITE, i, count)
|
|
@@ -47134,7 +47144,10 @@ def printShowWebMasterSites(users):
|
|
|
47134
47144
|
j = 0
|
|
47135
47145
|
for site in sorted(sites, key=lambda k: k['siteUrl']):
|
|
47136
47146
|
j += 1
|
|
47137
|
-
|
|
47147
|
+
printKeyValueListWithCount(['Site', site['siteUrl']], j, jcount)
|
|
47148
|
+
Ind.Increment()
|
|
47149
|
+
printKeyValueList(['permissionLevel', site['permissionLevel']])
|
|
47150
|
+
Ind.Decrement()
|
|
47138
47151
|
Ind.Decrement()
|
|
47139
47152
|
else:
|
|
47140
47153
|
for site in sites:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=w02rYK598O7U2qyWCx6AHGAVdYWfQc-ky-A6hbTzP7k,3569860
|
|
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
|
|
@@ -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.17.
|
|
69
|
-
gam7-7.17.
|
|
70
|
-
gam7-7.17.
|
|
71
|
-
gam7-7.17.
|
|
72
|
-
gam7-7.17.
|
|
68
|
+
gam7-7.17.2.dist-info/METADATA,sha256=b_c7VSX_oXFw33FJ15f6Yk3YqiMde8__w2Q0o05HPjQ,2940
|
|
69
|
+
gam7-7.17.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.17.2.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.17.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.17.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|