gam7 7.19.1__py3-none-any.whl → 7.19.3__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 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.19.01'
28
+ __version__ = '7.19.03'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -5807,7 +5807,7 @@ def convertUIDtoEmailAddress(emailAddressOrUID, cd=None, emailTypes=None,
5807
5807
  normalizedEmailAddressOrUID = normalizeEmailAddressOrUID(emailAddressOrUID, ciGroupsAPI=ciGroupsAPI)
5808
5808
  if normalizedEmailAddressOrUID.startswith(NON_EMAIL_MEMBER_PREFIXES):
5809
5809
  return normalizedEmailAddressOrUID
5810
- email, _ = convertUIDtoEmailAddressWithType(emailAddressOrUID, cd, emailTypes,
5810
+ email, _ = convertUIDtoEmailAddressWithType(emailAddressOrUID, cd, None, emailTypes,
5811
5811
  checkForCustomerId, ciGroupsAPI, aliasAllowed)
5812
5812
  return email
5813
5813
 
@@ -32228,9 +32228,9 @@ def doUpdateMobileDevices():
32228
32228
  [Msg.ACTION_APPLIED, body['action']], i, count)
32229
32229
  except GAPI.internalError:
32230
32230
  entityActionFailedWarning([Ent.MOBILE_DEVICE, resourceId], Msg.DOES_NOT_EXIST, i, count)
32231
- except (GAPI.resourceIdNotFound, GAPI.badRequest, GAPI.resourceNotFound) as e:
32231
+ except (GAPI.resourceIdNotFound, GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden) as e:
32232
32232
  entityActionFailedWarning([Ent.MOBILE_DEVICE, resourceId], str(e), i, count)
32233
- except (GAPI.forbidden, GAPI.permissionDenied) as e:
32233
+ except GAPI.permissionDenied as e:
32234
32234
  ClientAPIAccessDeniedExit(str(e))
32235
32235
 
32236
32236
  # gam delete mobile|mobiles <MobileDeviceEntity>
@@ -44907,6 +44907,12 @@ def waitForMailbox(entityList):
44907
44907
  Ind.Decrement()
44908
44908
 
44909
44909
  def getUserLicenses(lic, user, skus):
44910
+ reasons_to_quit = [
44911
+ GAPI.ACCESS_NOT_CONFIGURED, # license API not turned on
44912
+ GAPI.PERMISSION_DENIED, # Admin doesn't have rights to license assignments
44913
+ GAPI.NOT_FOUND # API call succeeded, user does not have this license
44914
+ ]
44915
+
44910
44916
  def _callbackGetLicense(request_id, response, exception):
44911
44917
  if exception is None:
44912
44918
  if response and 'skuId' in response:
@@ -44914,18 +44920,12 @@ def getUserLicenses(lic, user, skus):
44914
44920
  del sku_calls[request_id]
44915
44921
  else:
44916
44922
  _, reason, _ = checkGAPIError(exception, softErrors=True)
44917
- reasons_to_quit = [
44918
- GAPI.ACCESS_NOT_CONFIGURED, # license API not turned on
44919
- GAPI.PERMISSION_DENIED, # Admin doesn't have rights to license assignments
44920
- GAPI.NOT_FOUND # API call succeeded, user does not have this license
44921
- ]
44922
44923
  if reason in reasons_to_quit:
44923
44924
  del sku_calls[request_id]
44924
44925
 
44925
44926
  licenses = []
44926
44927
  svcargs = dict([('userId', user['primaryEmail']), ('productId', None), ('skuId', None), ('fields', 'skuId')]+GM.Globals[GM.EXTRA_ARGS_LIST])
44927
44928
  method = getattr(lic.licenseAssignments(), 'get')
44928
- dbatch = lic.new_batch_http_request(callback=_callbackGetLicense)
44929
44929
  sku_calls = {}
44930
44930
  for sku in skus:
44931
44931
  svcparms = svcargs.copy()
@@ -44944,7 +44944,7 @@ def getUserLicenses(lic, user, skus):
44944
44944
  if try_count >= 5:
44945
44945
  # give up and return what we have
44946
44946
  return licenses
44947
- time.sleep(5)
44947
+ time.sleep(5)
44948
44948
  return licenses
44949
44949
 
44950
44950
  USER_NAME_PROPERTY_PRINT_ORDER = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.19.1
3
+ Version: 7.19.3
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=v_f6su0DU1Y8sZtTT6vOeiHVMZgh3rpOQUmb9NOoy6M,3584396
1
+ gam/__init__.py,sha256=ngnkOfi7vZjdRs83cEbcphscUZiEoju6GlIDSBF9nVM,3584315
2
2
  gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
3
3
  gam/cacerts.pem,sha256=DUsVo2XlFYwfkhe3gnxa-Km4Z4noz74hSApXwTT-nQE,44344
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.19.1.dist-info/METADATA,sha256=pql652oT3XdQ8EVv88iKWb9ckPLa3K93DNtfPnehJIw,2940
69
- gam7-7.19.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.19.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.19.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.19.1.dist-info/RECORD,,
68
+ gam7-7.19.3.dist-info/METADATA,sha256=TeUdQCPXnItSyqXwJbMSkU3f43C-2H1wKRyc2AF7YPM,2940
69
+ gam7-7.19.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.19.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.19.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.19.3.dist-info/RECORD,,
File without changes