From 8fb01205eac223d7c9d8a09f214d042d99ef18d0 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Fri, 18 Aug 2023 15:14:28 +0000 Subject: [PATCH 1/3] gdata: cleanup some regex --- src/gam/gdata/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gam/gdata/service.py b/src/gam/gdata/service.py index a2e9b728..7efe0bf6 100644 --- a/src/gam/gdata/service.py +++ b/src/gam/gdata/service.py @@ -1087,7 +1087,7 @@ class GDataService(atom.service.AtomService): location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: - m = re.compile('[?&]gsessionid=(\w*)').search(location) + m = re.compile(r'[?&]gsessionid=(\w*)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.Get(self, location, extra_headers, redirects_remaining - 1, @@ -1335,7 +1335,7 @@ class GDataService(atom.service.AtomService): location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: - m = re.compile('[?&]gsessionid=(\w*)').search(location) + m = re.compile(r'[?&]gsessionid=(\w*)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.PostOrPut(self, verb, data, location, @@ -1433,7 +1433,7 @@ class GDataService(atom.service.AtomService): location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: - m = re.compile('[?&]gsessionid=(\w*)').search(location) + m = re.compile(r'[?&]gsessionid=(\w*)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.Delete(self, location, extra_headers, From dcf63e203a284266b5d95ed9eeb30b334b0380ca Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Fri, 18 Aug 2023 11:22:17 -0400 Subject: [PATCH 2/3] actions: expect no tests to run (exit code 5) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab86843d..8b793379 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -568,7 +568,7 @@ jobs: - name: Basic Tests all jobs id: basictests run: | - $PYTHON -m unittest discover --start-directory ./ --pattern "*_test.py" --buffer + $PYTHON -m unittest discover --start-directory ./ --pattern "*_test.py" --buffer || if [ $? != 5 ]; then exit $?; fi # exit 5 is no tests $gam version extended export GAMVERSION=$($gam version simple) echo "GAM Version ${GAMVERSION}" From c163d9ac4604e625e99c73b3bf7c94bcce2d2436 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Fri, 18 Aug 2023 17:37:48 +0000 Subject: [PATCH 3/3] output signjwt data for troubleshooting --- src/gam/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 812d7d3a..823f2ba4 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -12222,6 +12222,7 @@ def doCreateGCPServiceAccount(): systemErrorExit(API_ACCESS_DENIED_RC, str(e)) sa_info['client_id'] = token_info['issued_to'] sa_output = json.dumps(sa_info, ensure_ascii=False, sort_keys=True, indent=2) + print(f'Writing SignJWT service account data:\n\n{sa_output}') writeFile(GC.Values[GC.OAUTH2SERVICE_JSON], sa_output, continueOnError=False) # Audit command utilities