comparison backend/couchdb/Preferences.py @ 246:7c719c4f5655

Fix all remaining code style bugs
author Dirk Olmes <dirk@xanthippe.ping.de>
date Tue, 09 Jun 2015 02:45:29 +0200
parents e34c53a3e407
children f79be01821c4
comparison
equal deleted inserted replaced
245:8e73a8ae863f 246:7c719c4f5655
20 try: 20 try:
21 row = iter(viewResults).next() 21 row = iter(viewResults).next()
22 self.document = self.database[row.id] 22 self.document = self.database[row.id]
23 except StopIteration: 23 except StopIteration:
24 empty = {"doctype": "preferences"} 24 empty = {"doctype": "preferences"}
25 doc_id, doc_rev = self.database.save(empty) #@UnusedVariable 25 doc_id, doc_rev = self.database.save(empty)
26 self.document = self.database[doc_id] 26 self.document = self.database[doc_id]
27 27
28 def _documentValue(self, key, defaultValue=None): 28 def _documentValue(self, key, defaultValue=None):
29 if key in self.document.keys(): 29 if key in self.document.keys():
30 return self.document[key] 30 return self.document[key]