mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
interface was suppressing storage r/w exceptions
This commit is contained in:
parent
cf01788c86
commit
fecef91ee0
2 changed files with 4 additions and 1 deletions
|
@ -28,6 +28,7 @@ import ssl
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import socket
|
||||||
from typing import Tuple, Union, List, TYPE_CHECKING, Optional
|
from typing import Tuple, Union, List, TYPE_CHECKING, Optional
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from ipaddress import IPv4Network, IPv6Network, ip_address
|
from ipaddress import IPv4Network, IPv6Network, ip_address
|
||||||
|
@ -332,7 +333,8 @@ class Interface(Logger):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
await self.open_session(ssl_context)
|
await self.open_session(ssl_context)
|
||||||
except (asyncio.CancelledError, OSError, aiorpcx.socks.SOCKSError) as e:
|
except (asyncio.CancelledError, ConnectionError, socket.gaierror, aiorpcx.socks.SOCKSError) as e:
|
||||||
|
# note: catching OSError would be too broad here... don't want to catch file system exceptions
|
||||||
self.logger.info(f'disconnecting due to: {repr(e)}')
|
self.logger.info(f'disconnecting due to: {repr(e)}')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ class WalletStorage(Logger):
|
||||||
DB_Class = JsonDB
|
DB_Class = JsonDB
|
||||||
self.logger.info(f"wallet path {self.path}")
|
self.logger.info(f"wallet path {self.path}")
|
||||||
self.pubkey = None
|
self.pubkey = None
|
||||||
|
# TODO we should test r/w permissions here (whether file exists or not)
|
||||||
if self.file_exists():
|
if self.file_exists():
|
||||||
with open(self.path, "r", encoding='utf-8') as f:
|
with open(self.path, "r", encoding='utf-8') as f:
|
||||||
self.raw = f.read()
|
self.raw = f.read()
|
||||||
|
|
Loading…
Add table
Reference in a new issue