()
| 236 | return False |
| 237 | |
| 238 | def bmSettings(): #Allows the viewing and modification of keys.dat settings. |
| 239 | global keysPath |
| 240 | global usrPrompt |
| 241 | keysPath = 'keys.dat' |
| 242 | |
| 243 | BMConfigParser().read(keysPath)#Read the keys.dat |
| 244 | try: |
| 245 | port = BMConfigParser().get('bitmessagesettings', 'port') |
| 246 | except: |
| 247 | print '\n File not found.\n' |
| 248 | usrPrompt = 0 |
| 249 | main() |
| 250 | |
| 251 | startonlogon = BMConfigParser().safeGetBoolean('bitmessagesettings', 'startonlogon') |
| 252 | minimizetotray = BMConfigParser().safeGetBoolean('bitmessagesettings', 'minimizetotray') |
| 253 | showtraynotifications = BMConfigParser().safeGetBoolean('bitmessagesettings', 'showtraynotifications') |
| 254 | startintray = BMConfigParser().safeGetBoolean('bitmessagesettings', 'startintray') |
| 255 | defaultnoncetrialsperbyte = BMConfigParser().get('bitmessagesettings', 'defaultnoncetrialsperbyte') |
| 256 | defaultpayloadlengthextrabytes = BMConfigParser().get('bitmessagesettings', 'defaultpayloadlengthextrabytes') |
| 257 | daemon = BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon') |
| 258 | |
| 259 | socksproxytype = BMConfigParser().get('bitmessagesettings', 'socksproxytype') |
| 260 | sockshostname = BMConfigParser().get('bitmessagesettings', 'sockshostname') |
| 261 | socksport = BMConfigParser().get('bitmessagesettings', 'socksport') |
| 262 | socksauthentication = BMConfigParser().safeGetBoolean('bitmessagesettings', 'socksauthentication') |
| 263 | socksusername = BMConfigParser().get('bitmessagesettings', 'socksusername') |
| 264 | sockspassword = BMConfigParser().get('bitmessagesettings', 'sockspassword') |
| 265 | |
| 266 | |
| 267 | print '\n -----------------------------------' |
| 268 | print ' | Current Bitmessage Settings |' |
| 269 | print ' -----------------------------------' |
| 270 | print ' port = ' + port |
| 271 | print ' startonlogon = ' + str(startonlogon) |
| 272 | print ' minimizetotray = ' + str(minimizetotray) |
| 273 | print ' showtraynotifications = ' + str(showtraynotifications) |
| 274 | print ' startintray = ' + str(startintray) |
| 275 | print ' defaultnoncetrialsperbyte = ' + defaultnoncetrialsperbyte |
| 276 | print ' defaultpayloadlengthextrabytes = ' + defaultpayloadlengthextrabytes |
| 277 | print ' daemon = ' + str(daemon) |
| 278 | print '\n ------------------------------------' |
| 279 | print ' | Current Connection Settings |' |
| 280 | print ' -----------------------------------' |
| 281 | print ' socksproxytype = ' + socksproxytype |
| 282 | print ' sockshostname = ' + sockshostname |
| 283 | print ' socksport = ' + socksport |
| 284 | print ' socksauthentication = ' + str(socksauthentication) |
| 285 | print ' socksusername = ' + socksusername |
| 286 | print ' sockspassword = ' + sockspassword |
| 287 | print ' ' |
| 288 | |
| 289 | uInput = userInput("Would you like to modify any of these settings, (Y)es or (N)o?").lower() |
| 290 | |
| 291 | if uInput == "y": |
| 292 | while True: #loops if they mistype the setting name, they can exit the loop with 'exit' |
| 293 | invalidInput = False |
| 294 | uInput = userInput("What setting would you like to modify?").lower() |
| 295 | print ' ' |
no test coverage detected