def _configChanged(self, pillow, path): from wallaby.pf.peer.viewer import Viewer if not self._configDoc or not Viewer.matchPath("rooms." + self._name, path): return config = self._configDoc.get("rooms." + self._name) import json if config != None and (self._lastConfig == None or json.dumps(config) != json.dumps(self._lastConfig)): self._lastConfig = copy.deepcopy(config) if 'Peers' in config: del self._peers[:] # clear all pre-configured peers else: self._peers = [] config['Peers'] = [] for mod in config['Peers']: if isinstance(mod, dict): self._peers.append(mod) self._unclean = True self.createPeers()