Fix the undefined "msg" variable
Change-Id: Ic8f0f7953e1fff9d003e6f8bca89a0622c9067f7
This commit is contained in:
parent
acdb81876b
commit
46cff0dd2c
@ -255,13 +255,12 @@ class FloatingIPController(rest.RestController):
|
||||
fip = self.network_api.associate_floating_ip(
|
||||
pecan.request.context, floating_address=address,
|
||||
port_id=port_id, fixed_address=fixed_address)
|
||||
except exception.FloatingIpNotFoundForAddress:
|
||||
msg = _('floating IP not found')
|
||||
except exception.FloatingIpNotFoundForAddress as e:
|
||||
raise wsme.exc.ClientSideError(
|
||||
msg, status_code=http_client.NOT_FOUND)
|
||||
e.message, status_code=http_client.NOT_FOUND)
|
||||
except exception.Forbidden as e:
|
||||
raise wsme.exc.ClientSideError(
|
||||
msg, status_code=http_client.FORBIDDEN)
|
||||
e.message, status_code=http_client.FORBIDDEN)
|
||||
except Exception as e:
|
||||
msg = _('Unable to associate floating IP %(address)s to '
|
||||
'fixed IP %(fixed_address)s for instance %(id)s. '
|
||||
|
Loading…
Reference in New Issue
Block a user