From eda9153ec353ebd62c4bd1edddde94e7afe4c2b3 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Thu, 2 Oct 2014 07:42:24 -0400 Subject: [PATCH] soft fail on license changes --- gam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gam.py b/gam.py index 9c147049..03fdf45a 100644 --- a/gam.py +++ b/gam.py @@ -2540,9 +2540,9 @@ def doLicense(users, operation): if user.find(u'@') == -1: user = u'%s@%s' % (user, domain) if operation == u'delete': - callGAPI(service=lic.licenseAssignments(), function=operation, productId=productId, skuId=skuId, userId=user) + callGAPI(service=lic.licenseAssignments(), function=operation, soft_errors=True, productId=productId, skuId=skuId, userId=user) elif operation == u'insert': - callGAPI(service=lic.licenseAssignments(), function=operation, productId=productId, skuId=skuId, body={u'userId': user}) + callGAPI(service=lic.licenseAssignments(), function=operation, soft_errors=True, productId=productId, skuId=skuId, body={u'userId': user}) elif operation == u'patch': try: old_sku = sys.argv[6] @@ -2552,7 +2552,7 @@ def doLicense(users, operation): print u'You need to specify the user\'s old SKU as the last argument' sys.exit(5) old_product, old_sku = getProductAndSKU(old_sku) - callGAPI(service=lic.licenseAssignments(), function=operation, productId=productId, skuId=old_sku, userId=user, body={u'skuId': skuId}) + callGAPI(service=lic.licenseAssignments(), function=operation, soft_errors=True, productId=productId, skuId=old_sku, userId=user, body={u'skuId': skuId}) def doPop(users): if sys.argv[4].lower() in true_values: