diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 734db16..552a90c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,3 +57,13 @@ repos: language: system types: [ python ] require_serial: true + + - repo: local + hooks: + - id: poetry-lock-check + name: poetry lock check + entry: poetry + language: system + files: no-files + args: ["lock", "--check"] + always_run: true diff --git a/pyproject.toml b/pyproject.toml index b566cfa..a2f370d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "0.3.5" +version = "0.3.6" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/ipfs.py b/sw_utils/ipfs.py index 9b0487a..6d70d30 100644 --- a/sw_utils/ipfs.py +++ b/sw_utils/ipfs.py @@ -212,7 +212,7 @@ async def _upload(self, coros: list) -> str: ipfs_hashes: dict[str, int] = {} for value in result: if isinstance(value, BaseException): - logger.error(value) + logger.error(repr(value)) continue ipfs_hash = _strip_ipfs_prefix(value) @@ -236,7 +236,7 @@ async def remove(self, ipfs_hash: str) -> None: ) for value in result: if isinstance(value, BaseException): - logger.error(value) + logger.error(repr(value)) continue return None @@ -262,7 +262,7 @@ async def fetch_bytes(self, ipfs_hash: str) -> bytes: return self._ipfs_fetch_bytes(endpoint, ipfs_hash) except Exception as e: - logger.error(e) + logger.error(repr(e)) raise IpfsException(f'Failed to fetch IPFS data at {ipfs_hash}') @@ -293,7 +293,7 @@ async def fetch_json(self, ipfs_hash: str) -> dict | list: return self._ipfs_fetch_json(endpoint, ipfs_hash) except Exception as e: - logger.error(e) + logger.error(repr(e)) raise IpfsException(f'Failed to fetch IPFS data at {ipfs_hash}')