diff src/browser/sat_browser/json.py @ 700:b81816f42c81

browser side: added signal caching before profile is plugged, as QuickFrontend mechanism is not used
author Goffi <goffi@goffi.org>
date Wed, 27 May 2015 19:10:16 +0200
parents b395d1309936
children 3b91225b457a
line wrap: on
line diff
--- a/src/browser/sat_browser/json.py	Mon Apr 20 17:10:38 2015 +0200
+++ b/src/browser/sat_browser/json.py	Wed May 27 19:10:16 2015 +0200
@@ -261,4 +261,8 @@
             return
         if with_profile:
             args.append(C.PROF_KEY_NONE)
-        callback(*args)
+        if not self.host._profile_plugged:
+            log.debug("Profile is not plugged, we cache the signal")
+            self.host.signals_cache[C.PROF_KEY_NONE].append((name, callback, args, {}))
+        else:
+            callback(*args)