EOX GitLab Instance

Commit 15397701 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing HTTP Source

parent 9b95a70c
Pipeline #22293 failed with stages
in 46 seconds
import logging
from typing import IO, AnyStr, List
from urllib.parse import urljoin
from io import StringIO
import requests
from dateutil.parser import parse
......@@ -25,9 +26,8 @@ class HTTPSource(Source):
def open(self, path: str) -> IO[AnyStr]:
url = urljoin(self.root_url, path)
logger.debug(f"Opening URL: {url}")
response = self.session.get(url, stream=True)
response.raise_for_status()
return response.raw
response = self.session.get(url)
return StringIO(response.text)
def stat(self, path: str) -> Stat:
url = urljoin(self.root_url, path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment