Skip to content

Commit

Permalink
Updated code to eliminate trap caused by bug introduced in 7.02.00
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Dec 26, 2024
1 parent d0d5ac7 commit 47ec931
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -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 <UserTypeEntity> update license <NewSKUID> from <OldSKUID>` that causes GAM
Expand Down
14 changes: 8 additions & 6 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

__author__ = 'GAM Team <[email protected]>'
__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
Expand Down Expand Up @@ -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)
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/gam/googleapiclient/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 47ec931

Please sign in to comment.