File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -170,16 +170,17 @@ async def bind_handle_to_claim(
170
170
_content_type = 'application/json-patch+json' ,
171
171
body = patch ,
172
172
)
173
+ matched_resource_handle = ResourceHandle .__register_definition (definition = definition )
173
174
except kubernetes_asyncio .client .exceptions .ApiException as exception :
174
175
if exception .status == 404 :
175
176
logger .warning (f"Attempt to bind deleted { matched_resource_handle } to { resource_claim } " )
176
177
matched_resource_handle .__unregister ()
177
178
matched_resource_handle = None
178
179
else :
179
180
raise
180
- matched_resource_handle = ResourceHandle . __register_definition ( definition = definition )
181
- logger .info (f"Bound { matched_resource_handle } to { resource_claim } " )
182
- break
181
+ if matched_resource_handle :
182
+ logger .info (f"Bound { matched_resource_handle } to { resource_claim } " )
183
+ break
183
184
else :
184
185
# No unbound resource handle matched
185
186
return None
You can’t perform that action at this time.
0 commit comments