mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-16 13:00:52 +02:00
Handle empty bitcoincli path gracefully instead of crashing
When bclock.conf has an empty bitcoincli path, catch the PermissionError and redirect to introINIT() with a helpful error message instead of crashing with 'Fatal error: Permission denied'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
88b1609100
commit
cc9a5e236e
1 changed files with 8 additions and 0 deletions
|
|
@ -7407,6 +7407,14 @@ def main():
|
|||
except KeyboardInterrupt:
|
||||
print("\n")
|
||||
sys.exit(0)
|
||||
except PermissionError as e:
|
||||
if str(e).endswith("''"):
|
||||
show_error("Bitcoin CLI path is not configured. Please set it up.")
|
||||
logger.error("Empty bitcoincli path in bclock.conf")
|
||||
introINIT()
|
||||
else:
|
||||
logger.error("Fatal error: %s", e)
|
||||
sys.exit(101)
|
||||
except Exception as e:
|
||||
logger.error("Fatal error: %s", e)
|
||||
sys.exit(101)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue