Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions inventree/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ def testServer(self):
logger.info("Checking InvenTree server connection...")

try:
response = requests.get(self.api_url, timeout=self.timeout, proxies=self.proxies)
response = requests.get(
self.api_url,
timeout=self.timeout,
proxies=self.proxies,
verify=self.strict
)
except requests.exceptions.ConnectionError as e:
logger.fatal(f"Server connection error: {str(type(e))}")
return False
Expand Down Expand Up @@ -583,13 +588,15 @@ def downloadFile(self, url, destination, overwrite=False, params=None, proxies=d
auth = self.auth

with requests.get(
fullurl,
stream=True,
auth=auth,
headers=headers,
params=params,
timeout=self.timeout,
proxies=self.proxies) as response:
fullurl,
stream=True,
auth=auth,
headers=headers,
params=params,
timeout=self.timeout,
proxies=self.proxies,
verify=self.strict,
) as response:

# Error code
if response.status_code >= 300:
Expand Down
2 changes: 1 addition & 1 deletion inventree/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from . import api as inventree_api

INVENTREE_PYTHON_VERSION = "0.17.3"
INVENTREE_PYTHON_VERSION = "0.17.4"


logger = logging.getLogger('inventree')
Expand Down