Skip to content

Commit 43f2a54

Browse files
author
Dishy.Dev
committed
Fixing a pylint error
1 parent e855ac2 commit 43f2a54

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

geoip2/webservice.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@
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-
5846
import geoip2
5947
import geoip2.models
6048
from geoip2.errors import (
@@ -69,6 +57,18 @@
6957
from geoip2.models import City, Country, Insights
7058
from 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+
7272
if "aiohttp" in sys.modules:
7373
_AIOHTTP_UA = (
7474
f"GeoIP2-Python-Client/{geoip2.__version__} {aiohttp.http.SERVER_SOFTWARE}"

0 commit comments

Comments
 (0)