Merge "Avoid referenced before assignment in retry_on_conflict"
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
index 1788463..db0d200 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
@@ -34,14 +34,13 @@
     def inner(*args, **kwargs):
         # TODO(vsaienko): make number of retries and delay between
         # them configurable in future.
-        e = None
         for att in range(10):
             try:
                 return func(*args, **kwargs)
-            except lib_exc.Conflict as e:
+            except lib_exc.Conflict:
+                if att == 9:
+                    raise
                 time.sleep(1)
-        raise lib_exc.Conflict(e)
-
     return inner