Fix Exception string arguments

Need to use % for arguments to Exception().

W0715: Exception arguments suggest string formatting might
       be intended (raising-format-tuple)

Trivialfix

Change-Id: I1afc2e4a3b34e548247e8a499fe45602454f36f5
This commit is contained in:
Brian Haley 2020-02-28 12:29:26 -05:00
parent b7503fcb18
commit 33fb73aff7
1 changed files with 4 additions and 4 deletions

View File

@ -213,10 +213,10 @@ class TestOctaviaOvnProviderDriver(
self.assertEqual(expected_lb, observed_lb)
found = True
if not found:
raise Exception("Expected LB %(name)s for protocol %(proto)s "
"not found in observed_lbs", {
'name': expected_lb.get('name'),
'proto': expected_lb.get('proto')})
raise Exception("Expected LB %s for protocol %s "
"not found in observed_lbs" % (
expected_lb.get('name'),
expected_lb.get('proto')))
def _is_lb_associated_to_ls(self, lb_name, ls_name):
return self._is_lb_associated_to_tab(