@ -83,7 +83,7 @@ from electrum import SimpleConfig
from electrum.wallet import Wallet
from electrum.wallet import Wallet
from electrum.storage import WalletStorage, get_derivation_used_for_hw_device_encryption
from electrum.storage import WalletStorage, get_derivation_used_for_hw_device_encryption
from electrum.util import print_msg, print_stderr, json_encode, json_decode, UserCancelled
from electrum.util import print_msg, print_stderr, json_encode, json_decode, UserCancelled
from electrum.util import set_verbosity, InvalidPassword
from electrum.util import InvalidPassword
from electrum.commands import get_parser, known_commands, Commands, config_variables
from electrum.commands import get_parser, known_commands, Commands, config_variables
from electrum import daemon
from electrum import daemon
from electrum import keystore
from electrum import keystore
@ -277,6 +277,9 @@ if __name__ == '__main__':
sys.argv.append('-h')
sys.argv.append('-h')
# old '-v' syntax
# old '-v' syntax
# Due to this workaround that keeps old -v working,
# more advanced usages of -v need to use '-v='.
# e.g. -v=debug,network=warning,interface=error
try:
try:
i = sys.argv.index('-v')
i = sys.argv.index('-v')
except ValueError:
except ValueError:
@ -324,10 +327,7 @@ if __name__ == '__main__':
if config_options.get('portable'):
if config_options.get('portable'):
config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data')
config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data')
# kivy sometimes freezes when we write to sys.stderr
if not config_options.get('verbosity'):
log_verbosity = config_options.get('verbosity') if config_options.get('gui') != 'kivy' else ''
set_verbosity(log_verbosity)
if not log_verbosity:
warnings.simplefilter('ignore', DeprecationWarning)
warnings.simplefilter('ignore', DeprecationWarning)
# check uri
# check uri