Browse Source

log a warning if asserts are disabled

Maybe we should refuse to start, if launched with the main script.
But note that __debug__ is False on Android atm, as python is launched with -OO.
master
SomberNight 3 years ago
parent
commit
0f541be6f1
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/__init__.py

5
electrum/__init__.py

@ -29,6 +29,11 @@ from . import daemon
from .transaction import Transaction
from .plugin import BasePlugin
from .commands import Commands, known_commands
from .logging import get_logger
__version__ = ELECTRUM_VERSION
_logger = get_logger(__name__)
if not __debug__:
_logger.warning(f"__debug__ is False. running with asserts disabled!")

Loading…
Cancel
Save