Updated code quality binary operator line change & ignore bare except changes in class_objectProcessor.py
This commit is contained in:
parent
d872a23ae3
commit
5be370a2f2
|
@ -715,7 +715,7 @@ class objectProcessor(threading.Thread):
|
||||||
try:
|
try:
|
||||||
apiNotifyPath = BMConfigParser().get(
|
apiNotifyPath = BMConfigParser().get(
|
||||||
'bitmessagesettings', 'apinotifypath')
|
'bitmessagesettings', 'apinotifypath')
|
||||||
except:
|
except: # noqa:E722
|
||||||
apiNotifyPath = ''
|
apiNotifyPath = ''
|
||||||
if apiNotifyPath != '':
|
if apiNotifyPath != '':
|
||||||
call([apiNotifyPath, "newMessage"])
|
call([apiNotifyPath, "newMessage"])
|
||||||
|
@ -727,7 +727,7 @@ class objectProcessor(threading.Thread):
|
||||||
try:
|
try:
|
||||||
mailingListName = BMConfigParser().get(
|
mailingListName = BMConfigParser().get(
|
||||||
toAddress, 'mailinglistname')
|
toAddress, 'mailinglistname')
|
||||||
except:
|
except: # noqa:E722
|
||||||
mailingListName = ''
|
mailingListName = ''
|
||||||
# Let us send out this message as a broadcast
|
# Let us send out this message as a broadcast
|
||||||
subject = self.addMailingListNameToSubject(
|
subject = self.addMailingListNameToSubject(
|
||||||
|
@ -763,10 +763,10 @@ class objectProcessor(threading.Thread):
|
||||||
# Don't send ACK if invalid, blacklisted senders, invisible
|
# Don't send ACK if invalid, blacklisted senders, invisible
|
||||||
# messages, disabled or chan
|
# messages, disabled or chan
|
||||||
if (
|
if (
|
||||||
self.ackDataHasAValidHeader(ackData) and not blockMessage and
|
self.ackDataHasAValidHeader(ackData) and not blockMessage
|
||||||
messageEncodingType != 0 and
|
and messageEncodingType != 0
|
||||||
not BMConfigParser().safeGetBoolean(toAddress, 'dontsendack') and
|
and not BMConfigParser().safeGetBoolean(toAddress, 'dontsendack')
|
||||||
not BMConfigParser().safeGetBoolean(toAddress, 'chan')
|
and not BMConfigParser().safeGetBoolean(toAddress, 'chan')
|
||||||
):
|
):
|
||||||
self._ack_obj.send_data(ackData[24:])
|
self._ack_obj.send_data(ackData[24:])
|
||||||
|
|
||||||
|
@ -934,8 +934,8 @@ class objectProcessor(threading.Thread):
|
||||||
return
|
return
|
||||||
elif broadcastVersion == 5:
|
elif broadcastVersion == 5:
|
||||||
calculatedTag = hashlib.sha512(hashlib.sha512(
|
calculatedTag = hashlib.sha512(hashlib.sha512(
|
||||||
encodeVarint(sendersAddressVersion) +
|
encodeVarint(sendersAddressVersion)
|
||||||
encodeVarint(sendersStream) + calculatedRipe
|
+ encodeVarint(sendersStream) + calculatedRipe
|
||||||
).digest()).digest()[32:]
|
).digest()).digest()[32:]
|
||||||
if calculatedTag != embeddedTag:
|
if calculatedTag != embeddedTag:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
@ -1017,7 +1017,7 @@ class objectProcessor(threading.Thread):
|
||||||
try:
|
try:
|
||||||
apiNotifyPath = BMConfigParser().get(
|
apiNotifyPath = BMConfigParser().get(
|
||||||
'bitmessagesettings', 'apinotifypath')
|
'bitmessagesettings', 'apinotifypath')
|
||||||
except:
|
except: # noqa:E722
|
||||||
apiNotifyPath = ''
|
apiNotifyPath = ''
|
||||||
if apiNotifyPath != '':
|
if apiNotifyPath != '':
|
||||||
call([apiNotifyPath, "newBroadcast"])
|
call([apiNotifyPath, "newBroadcast"])
|
||||||
|
|
Reference in New Issue
Block a user