Skip to content

Commit

Permalink
Merge pull request #1116 from gbregman/devel
Browse files Browse the repository at this point in the history
Do not try to use None context in get_subsystems().
  • Loading branch information
gbregman authored Feb 18, 2025
2 parents 6b0ca41 + f664d46 commit 29696be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4718,8 +4718,9 @@ def get_subsystems_safe(self, request, context):
ret = rpc_nvmf.nvmf_get_subsystems(self.spdk_rpc_subsystems_client)
except Exception as ex:
self.logger.exception("get_subsystems failed")
context.set_code(grpc.StatusCode.INTERNAL)
context.set_details(f"{ex}")
if context:
context.set_code(grpc.StatusCode.INTERNAL)
context.set_details(f"{ex}")
return pb2.subsystems_info()

for s in ret:
Expand Down

0 comments on commit 29696be

Please sign in to comment.