Skip to content

Commit 5424651

Browse files
authored
Merge pull request #6 from mupastir/fix-req-sync
[Fix] Move import sync_req into method of sync MiniGram
2 parents 09dde84 + bb7daa8 commit 5424651

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/minigram/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import asyncio
2+
import importlib.util
23
import json
34
import re
45
import time
56

67
from copy import deepcopy
78
from typing import Optional, Any
89

9-
from .request import sync_req, async_req
10+
from .request import async_req
11+
12+
if not importlib.util.find_spec("aiohttp"):
13+
from .request import sync_req
14+
1015

1116
DEBUG = False
1217
ALLOWED_UPDATES = [

0 commit comments

Comments
 (0)