Py3 compatibility of ContentFilter plugin
This commit is contained in:
parent
4fe4d0a7e7
commit
883c2851ff
1 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ class ContentFilterStorage(object):
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
s = time.time()
|
s = time.time()
|
||||||
helper.atomicWrite(self.file_path, json.dumps(self.file_content, indent=2, sort_keys=True))
|
helper.atomicWrite(self.file_path, json.dumps(self.file_content, indent=2, sort_keys=True).encode("utf8"))
|
||||||
self.log.debug("Saved in %.3fs" % (time.time() - s))
|
self.log.debug("Saved in %.3fs" % (time.time() - s))
|
||||||
|
|
||||||
def isMuted(self, auth_address):
|
def isMuted(self, auth_address):
|
||||||
|
@ -123,7 +123,7 @@ class ContentFilterStorage(object):
|
||||||
# Search and remove or readd files of an user
|
# Search and remove or readd files of an user
|
||||||
def changeDbs(self, auth_address, action):
|
def changeDbs(self, auth_address, action):
|
||||||
self.log.debug("Mute action %s on user %s" % (action, auth_address))
|
self.log.debug("Mute action %s on user %s" % (action, auth_address))
|
||||||
res = self.site_manager.list().values()[0].content_manager.contents.db.execute(
|
res = list(self.site_manager.list().values())[0].content_manager.contents.db.execute(
|
||||||
"SELECT * FROM content LEFT JOIN site USING (site_id) WHERE inner_path LIKE :inner_path",
|
"SELECT * FROM content LEFT JOIN site USING (site_id) WHERE inner_path LIKE :inner_path",
|
||||||
{"inner_path": "%%/%s/%%" % auth_address}
|
{"inner_path": "%%/%s/%%" % auth_address}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue