Skip to content

Commit 419ee3f

Browse files
Fix http module imports (#491)
1 parent 325afcf commit 419ee3f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/dipdup/cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ async def cli(ctx, config: List[str], env_file: List[str]):
271271
_config.initialize(skip_imports=True)
272272
_init_sentry(_config)
273273

274-
raise Exception
275-
276274
# NOTE: Fire and forget, do not block instant commands
277275
if not _config.advanced.skip_version_check:
278276
asyncio.ensure_future(_check_version())

src/dipdup/http.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from contextlib import suppress
66
from http import HTTPStatus
77
from json import JSONDecodeError
8+
from os.path import isfile
9+
from os.path import join
810
from typing import Any
911
from typing import Mapping
1012
from typing import Optional
@@ -14,7 +16,6 @@
1416
import aiohttp
1517
import orjson
1618
from aiolimiter import AsyncLimiter
17-
from genericpath import isfile
1819

1920
from dipdup import __version__
2021
from dipdup.config import HTTPConfig
@@ -213,8 +214,8 @@ async def _replay_request(
213214
f'{self._url} {method} {url} {kwargs}'.encode(),
214215
).hexdigest()
215216
if not self._config.replay_path:
216-
raise Exception
217-
replay_path = self._config.replay_path.rstrip('/') + '/' + request_hash
217+
raise RuntimeError('Replay path is not set')
218+
replay_path = join(self._config.replay_path.rstrip('/'), request_hash)
218219

219220
if isfile(replay_path):
220221
with open(replay_path, 'rb') as file:

0 commit comments

Comments
 (0)