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
This commit is contained in:
Steve Baker 2020-09-24 11:58:05 +12:00
parent 0fdcc4b1b6
commit 2864957ca5
1 changed files with 1 additions and 1 deletions

View File

@ -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)