Replaced BMConfigParser().get with BMConfigParser().safeGet & removed exception handling
This commit is contained in:
parent
5be370a2f2
commit
05c34264f9
|
@ -712,23 +712,21 @@ class objectProcessor(threading.Thread):
|
||||||
# has arrived.
|
# has arrived.
|
||||||
if BMConfigParser().safeGetBoolean(
|
if BMConfigParser().safeGetBoolean(
|
||||||
'bitmessagesettings', 'apienabled'):
|
'bitmessagesettings', 'apienabled'):
|
||||||
try:
|
|
||||||
apiNotifyPath = BMConfigParser().get(
|
apiNotifyPath = BMConfigParser().safeGet(
|
||||||
'bitmessagesettings', 'apinotifypath')
|
'bitmessagesettings', 'apinotifypath')
|
||||||
except: # noqa:E722
|
|
||||||
apiNotifyPath = ''
|
if apiNotifyPath:
|
||||||
if apiNotifyPath != '':
|
|
||||||
call([apiNotifyPath, "newMessage"])
|
call([apiNotifyPath, "newMessage"])
|
||||||
|
|
||||||
# Let us now check and see whether our receiving address is
|
# Let us now check and see whether our receiving address is
|
||||||
# behaving as a mailing list
|
# behaving as a mailing list
|
||||||
if BMConfigParser().safeGetBoolean(toAddress, 'mailinglist') \
|
if BMConfigParser().safeGetBoolean(toAddress, 'mailinglist') \
|
||||||
and messageEncodingType != 0:
|
and messageEncodingType != 0:
|
||||||
try:
|
|
||||||
mailingListName = BMConfigParser().get(
|
mailingListName = BMConfigParser().safeGet(
|
||||||
toAddress, 'mailinglistname')
|
toAddress, 'mailinglistname', '')
|
||||||
except: # noqa:E722
|
|
||||||
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(
|
||||||
subject, mailingListName)
|
subject, mailingListName)
|
||||||
|
@ -1014,12 +1012,11 @@ class objectProcessor(threading.Thread):
|
||||||
# outside command to let some program know that a new message
|
# outside command to let some program know that a new message
|
||||||
# has arrived.
|
# has arrived.
|
||||||
if BMConfigParser().safeGetBoolean('bitmessagesettings', 'apienabled'):
|
if BMConfigParser().safeGetBoolean('bitmessagesettings', 'apienabled'):
|
||||||
try:
|
|
||||||
apiNotifyPath = BMConfigParser().get(
|
apiNotifyPath = BMConfigParser().safeGet(
|
||||||
'bitmessagesettings', 'apinotifypath')
|
'bitmessagesettings', 'apinotifypath')
|
||||||
except: # noqa:E722
|
|
||||||
apiNotifyPath = ''
|
if apiNotifyPath:
|
||||||
if apiNotifyPath != '':
|
|
||||||
call([apiNotifyPath, "newBroadcast"])
|
call([apiNotifyPath, "newBroadcast"])
|
||||||
|
|
||||||
# Display timing data
|
# Display timing data
|
||||||
|
|
Reference in New Issue
Block a user