Mercurial > hg > Feedworm
view backend/couchdb/Preferences.py @ 144:74217db92993
updating feeds on the couchdb backend works now
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 24 Aug 2011 11:54:06 +0200 |
parents | 9e1e6b96d8b0 |
children | 8ec20377bcb0 |
line wrap: on
line source
class Preferences(object): def __init__(self, database): self.database = database self.viewResults = self.database.view("feedtest/preference_by_key") def _valueForKey(self, key): try: resultsForKey = self.viewResults[key] row = iter(resultsForKey).next() return row.value["value"] except StopIteration: return None def isProxyConfigured(self): return self.proxyHost() is not None def proxyHost(self): return self._valueForKey("proxyHost") def proxyPort(self): return self._valueForKey("proxyPort")