@@ -69,6 +69,22 @@ def run(self):
6969 'ERROR trying to create database file (message.dat). Error message: %s\n ' % str (err ))
7070 os ._exit (0 )
7171
72+ if shared .config .getint ('bitmessagesettings' , 'settingsversion' ) == 1 :
73+ shared .config .set ('bitmessagesettings' , 'settingsversion' , '2' )
74+ # If the settings version is equal to 2 or 3 then the
75+ # sqlThread will modify the pubkeys table and change
76+ # the settings version to 4.
77+ shared .config .set ('bitmessagesettings' , 'socksproxytype' , 'none' )
78+ shared .config .set ('bitmessagesettings' , 'sockshostname' , 'localhost' )
79+ shared .config .set ('bitmessagesettings' , 'socksport' , '9050' )
80+ shared .config .set ('bitmessagesettings' , 'socksauthentication' , 'false' )
81+ shared .config .set ('bitmessagesettings' , 'socksusername' , '' )
82+ shared .config .set ('bitmessagesettings' , 'sockspassword' , '' )
83+ shared .config .set ('bitmessagesettings' , 'keysencrypted' , 'false' )
84+ shared .config .set ('bitmessagesettings' , 'messagesencrypted' , 'false' )
85+ with open (shared .appdata + 'keys.dat' , 'wb' ) as configfile :
86+ shared .config .write (configfile )
87+
7288 # People running earlier versions of PyBitmessage do not have the
7389 # usedpersonally field in their pubkeys table. Let's add it.
7490 if shared .config .getint ('bitmessagesettings' , 'settingsversion' ) == 2 :
@@ -158,7 +174,7 @@ def run(self):
158174 self .cur .execute ( ''' VACUUM ''' )
159175
160176 # After code refactoring, the possible status values for sent messages
161- # as changed.
177+ # have changed.
162178 self .cur .execute (
163179 '''update sent set status='doingmsgpow' where status='doingpow' ''' )
164180 self .cur .execute (
0 commit comments