From 47ec93140e40b1b31d41b5a68c6943c677fbad62 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 26 Dec 2024 08:36:25 -0800 Subject: [PATCH] Updated code to eliminate trap caused by bug introduced in 7.02.00 --- src/GamUpdate.txt | 4 ++++ src/gam/__init__.py | 14 ++++++++------ src/gam/googleapiclient/version.py | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 34745d50b..c1d287464 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,7 @@ +7.02.04 + +Updated code to eliminate trap caused by bug introduced in 7.02.00 that occurs when an invalid domain or OU is specified. + 7.02.03 Added option `archive` to `gam update license from ` that causes GAM diff --git a/src/gam/__init__.py b/src/gam/__init__.py index fbdd0e508..685f79d4f 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ """ __author__ = 'GAM Team ' -__version__ = '7.02.03' +__version__ = '7.02.04' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -628,7 +628,7 @@ def formatKeyValueList(prefixStr, kvList, suffixStr): msg += suffixStr return msg -# Something's wrong with CustomerID +# Something's wrong with CustomerID?? def accessErrorMessage(cd, errMsg=None): if cd is None: cd = buildGAPIObject(API.DIRECTORY) @@ -652,10 +652,12 @@ def accessErrorMessage(cd, errMsg=None): Ent.DOMAIN, GC.Values[GC.DOMAIN], Ent.USER, GM.Globals[GM.ADMIN]])+[Msg.ACCESS_FORBIDDEN], '') - return formatKeyValueList('', - [Ent.Singular(Ent.CUSTOMER_ID), GC.Values[GC.CUSTOMER_ID], - errMsg], - '') + if errMsg: + return formatKeyValueList('', + [Ent.Singular(Ent.CUSTOMER_ID), GC.Values[GC.CUSTOMER_ID], + errMsg], + '') + return None def accessErrorExit(cd, errMsg=None): systemErrorExit(INVALID_DOMAIN_RC, accessErrorMessage(cd or buildGAPIObject(API.DIRECTORY), errMsg)) diff --git a/src/gam/googleapiclient/version.py b/src/gam/googleapiclient/version.py index ea0841e63..b0ab7deff 100644 --- a/src/gam/googleapiclient/version.py +++ b/src/gam/googleapiclient/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.146.0" +__version__ = "2.156.0"