Fix invalid argument formatting in exception messages

This is to fix the invalid argument formatting in exception messages.

Change-Id: I8a392bcbaab360a8e425b1af90800f4f432a602b
This commit is contained in:
zhufl 2020-11-20 16:59:58 +08:00
parent 1a898f891b
commit 12fa7efcfe
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ class ZunCNIRegistryPlugin(object):
container = objects.Container.get_by_uuid(self.context,
container_uuid)
else:
raise exception.CNIError('Unexpected type: %s', container_type)
raise exception.CNIError('Unexpected type: %s' % container_type)
vifs = cni_utils.get_vifs(container)

View File

@ -241,7 +241,7 @@ class CriDriver(driver.BaseDriver, driver.CapsuleDriver):
)
if not response.containers:
raise exception.ZunException(
"Container %s is not found in runtime", container_id)
"Container %s is not found in runtime" % container_id)
container_response = response.containers[0]
self._populate_container(container, container_response)