Commit a92db28f authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed bug with background tags

parent 3064dbab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -170,13 +170,13 @@ class Tag(object):
        if not self.is_function:
            return

        if self.refresh is None:
        if self.refresh is None and not self.background:
            self.calculate_value()
            return

        # TODO more sophisticated calculation with event propagation
        self.watcher = loop.timer(.0, float(self.refresh), lambda *args:
                                  self.update_value())
        refresh = .0 if self.background else float(self.refresh)
        self.watcher = loop.timer(.0, refresh, lambda *args: self.update_value())
        self.watcher.start()

    def stop(self):