File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 4343 pass
4444
4545
46- # If neither requests or aiohttp is installed then inform user how to
47- # install them
48- if "aiohttp" not in sys .modules and "requests" not in sys .modules :
49- raise ImportError (
50- """To enable geoip2.webservice,
51- install aiohttp or requests support.
52- pip install geoip2[aiohttp]
53- pip install geoip2[requests]
54- pip install geoip2[all]"""
55- )
56-
57-
5846import geoip2
5947import geoip2 .models
6048from geoip2 .errors import (
6957from geoip2 .models import City , Country , Insights
7058from geoip2 .types import IPAddress
7159
60+ # If neither requests or aiohttp is installed then inform user how to
61+ # install them
62+ if "aiohttp" not in sys .modules and "requests" not in sys .modules :
63+ raise ImportError (
64+ """To enable geoip2.webservice,
65+ install aiohttp or requests support.
66+ pip install geoip2[aiohttp]
67+ pip install geoip2[requests]
68+ pip install geoip2[all]"""
69+ )
70+
71+
7272if "aiohttp" in sys .modules :
7373 _AIOHTTP_UA = (
7474 f"GeoIP2-Python-Client/{ geoip2 .__version__ } { aiohttp .http .SERVER_SOFTWARE } "
You can’t perform that action at this time.
0 commit comments