helper_inbox pylint fixes

This commit is contained in:
lakshyacis 2019-10-07 19:47:40 +05:30
parent 27c58b05f3
commit f4c7ac5604
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
"""Helper Inbox performs inbox messages related operations"""
from helper_sql import sqlExecute, sqlQuery
import queues
from helper_sql import sqlExecute, sqlQuery
def insert(t):
@ -13,11 +13,13 @@ def insert(t):
def trash(msgid):
"""Mark a message in the `inbox` as `trash`"""
sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid)
queues.UISignalQueue.put(('removeInboxRowByMsgid', msgid))
def isMessageAlreadyInInbox(sigHash):
"""Check for previous instances of this message"""
queryReturn = sqlQuery(
'''SELECT COUNT(*) FROM inbox WHERE sighash=?''', sigHash)
return queryReturn[0][0] != 0