Skip to content
Snippets Groups Projects
Commit 035ea6af authored by Anael Beutot's avatar Anael Beutot
Browse files

Fix tag update when calculation fail.

When tag calculation fails and the same tag is stopped as a side effect, we
don't try to update its value anymore.
parent 7be249d4
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,13 @@ class Tag(object):
prev_value = self.value
self.calculate_value()
if self.db is None:
# when we calculate the tag, the latter could raise an exception and
# could provoke a deconnection to the libvirt for example, that will
# also provoke a deregister of some tags which might include the
# current (in case this happens, just return)
return
if prev_value == self.value:
return
elif prev_value is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment