mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 14:43:34 +00:00
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:
13
src/gam.py
13
src/gam.py
@ -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')
|
||||
|
Reference in New Issue
Block a user