Skip to content

Commit 622c6a6

Browse files
committed
debug: show process output for debugging
1 parent 82073fc commit 622c6a6

File tree

1 file changed

+20
-13
lines changed
  • appengine/standard_python3/bundled-services/blobstore/django

1 file changed

+20
-13
lines changed

appengine/standard_python3/bundled-services/blobstore/django/main_test.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,27 @@ def gcloud_cli(command):
4040
full_command = f"gcloud {command} --quiet --format=json"
4141
print("Running command:", full_command)
4242

43-
output = subprocess.run(
44-
full_command,
45-
capture_output=True,
46-
shell=True,
47-
check=True,
48-
)
4943
try:
50-
entries = json.loads(output.stdout)
51-
return entries
52-
except Exception:
53-
print("Failed to read log")
54-
print(f"gcloud stderr was {output.stderr}")
55-
56-
raise Exception(output.stderr)
44+
output = subprocess.run(
45+
full_command,
46+
capture_output=True,
47+
shell=True,
48+
check=True,
49+
)
50+
51+
try:
52+
entries = json.loads(output.stdout)
53+
return entries
54+
except Exception:
55+
print("Failed to read log")
56+
print(f"gcloud stderr was {output.stderr}")
57+
58+
raise Exception(output.stderr + "POTATO")
59+
except subprocess.CalledProcessError as e:
60+
print(" Output: ", e.output)
61+
print(" StdOut: ", e.stdout)
62+
print(" StdErr: ", e.stderr)
63+
raise subprocess.CalledProcessError(e)
5764

5865

5966
# Wait for app to initialize

0 commit comments

Comments
 (0)