fixed CQ for bitmessageqt.settings module
This commit is contained in:
parent
277549cff1
commit
217a5c0c5b
|
@ -4,6 +4,7 @@ This module setting file is for settings
|
|||
import ConfigParser
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
|
@ -15,7 +16,6 @@ import openclpow
|
|||
import paths
|
||||
import queues
|
||||
import state
|
||||
import tempfile
|
||||
import widgets
|
||||
from bmconfigparser import BMConfigParser
|
||||
from helper_sql import sqlExecute, sqlStoredProcedure
|
||||
|
@ -30,7 +30,7 @@ def getSOCKSProxyType(config):
|
|||
result = ConfigParser.SafeConfigParser.get(
|
||||
config, 'bitmessagesettings', 'socksproxytype')
|
||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
||||
return
|
||||
return None
|
||||
else:
|
||||
if result.lower() in ('', 'none', 'false'):
|
||||
result = None
|
||||
|
@ -436,8 +436,7 @@ class SettingsDialog(QtGui.QDialog):
|
|||
'bitmessagesettings', 'maxacceptablenoncetrialsperbyte'
|
||||
) != str(int(
|
||||
float(self.lineEditMaxAcceptableTotalDifficulty.text())
|
||||
* defaults.networkDefaultProofOfWorkNonceTrialsPerByte)
|
||||
):
|
||||
* defaults.networkDefaultProofOfWorkNonceTrialsPerByte)):
|
||||
# the user changed the max acceptable total difficulty
|
||||
acceptableDifficultyChanged = True
|
||||
self.config.set(
|
||||
|
@ -454,8 +453,7 @@ class SettingsDialog(QtGui.QDialog):
|
|||
'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes'
|
||||
) != str(int(
|
||||
float(self.lineEditMaxAcceptableSmallMessageDifficulty.text())
|
||||
* defaults.networkDefaultPayloadLengthExtraBytes)
|
||||
):
|
||||
* defaults.networkDefaultPayloadLengthExtraBytes)):
|
||||
# the user changed the max acceptable small message difficulty
|
||||
acceptableDifficultyChanged = True
|
||||
self.config.set(
|
||||
|
|
Loading…
Reference in New Issue
Block a user