Fix dhcp_release when client_id is specified
Appending a string to a list results in each character being appended
as list items, this results in an invalid release command.
This change appends the client_id string to the list instead.
Change-Id: I71a114308e3b68f6daf6e1a202a47b6a453bb81a
Closes-Bug: #1896850
(cherry picked from commit 2864957ca5
)
This commit is contained in:
parent
685903e099
commit
0562335908
|
@ -23,7 +23,7 @@ def dhcp_release(interface_name, ip_address, mac_address, client_id,
|
|||
cmd += ['ip', 'netns', 'exec', namespace]
|
||||
cmd += ['dhcp_release', interface_name, ip_address, mac_address]
|
||||
if client_id:
|
||||
cmd += client_id
|
||||
cmd.append(client_id)
|
||||
log_errors = processutils.LOG_FINAL_ERROR
|
||||
return processutils.execute(*cmd, log_errors=log_errors)
|
||||
|
||||
|
|
Loading…
Reference in New Issue