Delayed import of requests module, speed check command, reqs updated

This commit is contained in:
Soxoj
2021-10-31 19:37:26 +03:00
parent 37854a867b
commit e3b4512c47
5 changed files with 17 additions and 11 deletions
+2 -2
View File
@@ -5,8 +5,6 @@ import json
import sys
from typing import Optional, List, Dict, Any, Tuple
import requests
from .utils import CaseConverter, URLMatcher, is_country_tag
@@ -359,6 +357,8 @@ class MaigretDatabase:
if not is_url_valid:
raise FileNotFoundError(f"Invalid data file URL '{url}'.")
import requests
try:
response = requests.get(url=url)
except Exception as error: