Keep the pylint wolf at bay (#430)

* Fix bug, update ducumantation

* Clean up error messages

* Exit on error, fix bug

* One more bug fix

* Update documentation, fix code

l_sku can never match a_sku.lower() because it has -'s stripped and
a_sku doesn't

* Keep the pylint wolf at bay

* Clean up code, avoid try/except
This commit is contained in:
Ross Scroggs
2017-02-11 05:31:34 -08:00
committed by Jay Lee
parent 3d7a7bd609
commit aa6dca4b4c
3 changed files with 43 additions and 38 deletions

View File

@ -22,9 +22,6 @@ With GAM you can programatically create users, turn on/off services for users li
For more information, see http://git.io/gam
"""
from var import *
import utils
import sys
import os
import string
@ -51,6 +48,9 @@ import oauth2client.service_account
import oauth2client.file
import oauth2client.tools
import utils
from var import *
# Override some oauth2client.tools strings saving us a few GAM-specific mods to oauth2client
oauth2client.tools._FAILED_START_MESSAGE = """
Failed to start a local webserver listening on either port 8080
@ -7710,11 +7710,8 @@ def doGetUserInfo(user_email=None):
print ' %s' % _skuIdToDisplayName(user_license)
def _skuIdToDisplayName(skuId):
try:
return SKUS[skuId][u'displayName']
except KeyError:
return skuId
return SKUS[skuId][u'displayName'] if skuId in SKUS else skuId
def doGetGroupInfo(group_name=None):
cd = buildGAPIObject(u'directory')
gs = buildGAPIObject(u'groupssettings')