def set_community_kwarg(self, key, value): from Tribler.community.privatesearch.oneswarm.community import PoliOneSwarmCommunity if key == 'use_megacache': value = self.str2bool(value) elif self.community_class != PoliOneSwarmCommunity: if key in ['ttl', 'neighbors', 'fneighbors']: value = self.str2tuple(value) elif key in ['max_prefs', 'max_fprefs']: value = int(value) elif key == 'prob': value = float(value) elif key == 'encryption': value = self.str2bool(value) else: return elif key == 'cancel_after': value = self.str2tuple(value) else: return DispersyExperimentScriptClient.set_community_kwarg(self, key, value) if DEBUG: print >> sys.stderr, "PrivateSearchClient: community_kwargs are now", self.community_kwargs
def set_community_kwarg(self, key, value): if key in ['max_prefs', 'max_fprefs']: value = int(value) elif key in ['encryption', 'send_simi_reveal']: value = self.str2bool(value) else: return DispersyExperimentScriptClient.set_community_kwarg(self, key, value) if DEBUG: print >> sys.stderr, "PrivateSearchClient: community_kwargs are now", self.community_kwargs