Avoid to iterate over empty list in DictMismatch
It is a little optimization of describe function. If there wasn't found any
differences, there is loop iterating over empty list. It isn't necessary,
because condition a few lines above do the same.
Change-Id: I65067801281c8703f7fa4d1430dcc578d28c3542
diff --git a/tempest/common/custom_matchers.py b/tempest/common/custom_matchers.py
index 7348a7d..57fe763 100644
--- a/tempest/common/custom_matchers.py
+++ b/tempest/common/custom_matchers.py
@@ -219,9 +219,9 @@
self.expected[o] != self.actual[o])
if diff_set:
msg += "Differences:\n"
- for o in diff_set:
- msg += " %s: expected %s, actual %s\n" % (
- o, self.expected[o], self.actual[o])
+ for o in diff_set:
+ msg += " %s: expected %s, actual %s\n" % (
+ o, self.expected[o], self.actual[o])
return msg
def get_details(self):