geoip: fix lints
This commit is contained in:
parent
ebdf1db636
commit
b5f0d1fa73
|
@ -75,9 +75,10 @@ class HTTPGeoIPStrategy(GeoIPStrategy):
|
|||
""" HTTP implementation to retrieve GeoIP information. We use the
|
||||
geoip.ubuntu.com service. """
|
||||
async def get_response(self) -> str:
|
||||
url = "https://geoip.ubuntu.com/lookup"
|
||||
try:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get("https://geoip.ubuntu.com/lookup") as response:
|
||||
async with session.get(url) as response:
|
||||
response.raise_for_status()
|
||||
return await response.text()
|
||||
except aiohttp.ClientError as e:
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import mock
|
||||
|
||||
from aioresponses import aioresponses
|
||||
|
||||
from subiquitycore.tests import SubiTestCase
|
||||
|
|
Loading…
Reference in New Issue