# HG changeset patch # User Goffi # Date 1448317841 -3600 # Node ID ad2ad28b89235e55b5fee888cb863c6ac91df811 # Parent 22a8e770cb7b40a6c828c27aab927f95e157ee3f quick_frontend: getFeatures is called on profile plug, and saved in host.features diff -r 22a8e770cb7b -r ad2ad28b8923 frontends/src/quick_frontend/quick_app.py --- a/frontends/src/quick_frontend/quick_app.py Mon Nov 23 23:30:41 2015 +0100 +++ b/frontends/src/quick_frontend/quick_app.py Mon Nov 23 23:30:41 2015 +0100 @@ -79,6 +79,14 @@ def _plug_profile_afterconnect(self): # Profile can be connected or not # we get cached data + self.host.bridge.getFeatures(profile_key=self.profile, callback=self._plug_profile_getFeaturesCb, errback=self._plug_profile_getFeaturesEb) + + def _plug_profile_getFeaturesEb(self, failure): + log.error(u"Couldn't get features: {}".format(failure)) + self._plug_profile_getFeaturesCb({}) + + def _plug_profile_getFeaturesCb(self, features): + self.host.features = features self.host.bridge.getEntitiesData([], ProfileManager.cache_keys_to_get, profile=self.profile, callback=self._plug_profile_gotCachedValues, errback=self._plug_profile_failedCachedValues) def _plug_profile_failedCachedValues(self, failure): @@ -270,6 +278,7 @@ self.current_action_ids = set() # FIXME: to be removed self.current_action_ids_cb = {} # FIXME: to be removed self.media_dir = self.bridge.getConfig('', 'media_dir') + self.features = None @property def current_profile(self):