Skip to content
Snippets Groups Projects
Commit bf6b598b authored by Simon Grasse's avatar Simon Grasse
Browse files

fix: use correct condition for probing if data is ready

parent 2939aacf
No related branches found
No related tags found
1 merge request!11Creation of first beta release version
......@@ -90,7 +90,7 @@ class Connection:
for i, wait_time in enumerate(self.wait_seconds):
print(f"try: {i+1}, wait_time: {wait_time}")
response = self.wait_and_get(status_endpoint, wait_secs=wait_time)
if response.headers == "application/zip":
if response.headers["Content-Type"] == "application/zip":
return response
else:
raise RuntimeError(
......@@ -171,7 +171,7 @@ class AnalysisService:
def load_data(
self, content: bytes, metadata: Metadata
) -> (pd.DataFrame, pd.DataFrame):
) -> tuple[pd.DataFrame, pd.DataFrame]:
zip_stream = io.BytesIO(content)
with ZipFile(zip_stream) as myzip:
timeseries = self.extract_data(myzip, metadata.statistic)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment