Handle missing settingsversion.

Otherwise I get this with python 3.8.7 when starting BM: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' (assuming changes in https://github.com/Bitmessage/PyBitmessage/pull/1746)
This commit is contained in:
Ilja 2021-03-23 17:24:43 +02:00 committed by GitHub
parent 6f9b66ddff
commit ba731a9282
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ def loadConfig():
def updateConfig():
"""Save the config"""
config = BMConfigParser()
if not config.has_option('bitmessagesettings', 'settingsversion'):
config.set('bitmessagesettings', 'settingsversion', 1)
settingsversion = config.getint('bitmessagesettings', 'settingsversion')
if settingsversion == 1:
config.set('bitmessagesettings', 'socksproxytype', 'none')