mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Merge pull request #801 from PR0M3TH3AN/codex/refactor-error-handling-in-init.py
Gracefully handle BIP85 import errors
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
# bip85/__init__.py
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from .bip85 import BIP85
|
||||
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.info("BIP85 module imported successfully.")
|
||||
logger.info("BIP85 module imported successfully.")
|
||||
except Exception as e:
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error(f"Failed to import BIP85 module: {e}", exc_info=True)
|
||||
logger.error("Failed to import BIP85 module: %s", e, exc_info=True)
|
||||
BIP85 = None
|
||||
|
||||
__all__ = ["BIP85"]
|
||||
__all__ = ["BIP85"] if BIP85 is not None else []
|
||||
|
Reference in New Issue
Block a user