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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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: