From ba731a92827f8cb029dc4f7fb8f118a30d06ef01 Mon Sep 17 00:00:00 2001 From: Ilja Date: Tue, 23 Mar 2021 17:24:43 +0200 Subject: [PATCH] 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) --- src/helper_startup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helper_startup.py b/src/helper_startup.py index fcd12aa4..469f3d11 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -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') -- 2.45.1