ensure we have an integer when we read max outgoing connections from disk
This commit is contained in:
parent
12f1e9f505
commit
37f69646e9
|
@ -433,8 +433,16 @@ class sqlThread(threading.Thread):
|
||||||
BMConfigParser().set('bitmessagesettings', 'smtpdeliver', '')
|
BMConfigParser().set('bitmessagesettings', 'smtpdeliver', '')
|
||||||
if not BMConfigParser().has_option('bitmessagesettings', 'hidetrayconnectionnotifications'):
|
if not BMConfigParser().has_option('bitmessagesettings', 'hidetrayconnectionnotifications'):
|
||||||
BMConfigParser().set('bitmessagesettings', 'hidetrayconnectionnotifications', 'false')
|
BMConfigParser().set('bitmessagesettings', 'hidetrayconnectionnotifications', 'false')
|
||||||
if not BMConfigParser().has_option('bitmessagesettings', 'maxoutboundconnections'):
|
if BMConfigParser().has_option('bitmessagesettings', 'maxoutboundconnections'):
|
||||||
|
try:
|
||||||
|
# Ensure we have an integer
|
||||||
|
int(float(BMConfigParser().get('bitmessagesettings', 'maxoutboundconnections')))
|
||||||
|
except:
|
||||||
|
logger.fatal('Your maximum outbound connections must be a number.')
|
||||||
|
os._exit(0)
|
||||||
|
else:
|
||||||
BMConfigParser().set('bitmessagesettings', 'maxoutboundconnections', '8')
|
BMConfigParser().set('bitmessagesettings', 'maxoutboundconnections', '8')
|
||||||
|
|
||||||
shared.writeKeysFile()
|
shared.writeKeysFile()
|
||||||
|
|
||||||
# Are you hoping to add a new option to the keys.dat file of existing
|
# Are you hoping to add a new option to the keys.dat file of existing
|
||||||
|
|
Reference in New Issue
Block a user