Skip to content

Commit d6136dc

Browse files
authored
fix(tpu): Moving return statement outside region tag
1 parent 22dd752 commit d6136dc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tpu/start_tpu.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ def start_cloud_tpu(project_id: str, zone: str, tpu_name: str = "tpu-name") -> N
4848
# Example response:
4949
# State.READY
5050

51-
return response
5251
except Exception as e:
5352
print(e)
53+
raise e
5454

5555
# [END tpu_vm_start]
56+
return response
5657

5758

5859
if __name__ == "__main__":

tpu/stop_tpu.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ def stop_cloud_tpu(project_id: str, zone: str, tpu_name: str = "tpu-name") -> No
4949
# Example response:
5050
# State.STOPPED
5151

52-
return response
5352
except Exception as e:
5453
print(e)
54+
raise e
5555

5656
# [END tpu_vm_stop]
57+
return response
5758

5859

5960
if __name__ == "__main__":

0 commit comments

Comments
 (0)