Fix error message when failing to remove breakpoint
When removing a breakpoint fails because the resource name was not found, the error would be reported using either the previous server_name or the client would crash with the error "local variable 'server_name' referenced before assignment". Change-Id: I35eb2359dbfc9b678dcd26a33766d8c19a456539
This commit is contained in:
parent
38feb02f5d
commit
4daff816e4
@ -42,6 +42,7 @@ class StackUpdateManager(object):
|
||||
succeeds = []
|
||||
fails = []
|
||||
for ref in refs:
|
||||
server_name = None
|
||||
try:
|
||||
res = resources['on_breakpoint'][ref]
|
||||
server_name = self._server_name(ref)
|
||||
@ -55,7 +56,7 @@ class StackUpdateManager(object):
|
||||
succeeds.append(ref)
|
||||
except Exception as err:
|
||||
LOG.error("failed to remove breakpoint on %s: %s",
|
||||
server_name, err)
|
||||
server_name or ref, err)
|
||||
fails.append(ref)
|
||||
return (succeeds, fails)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user