Skip to content

Commit

Permalink
chore: remove import of asyncio in non-async API
Browse files Browse the repository at this point in the history
  • Loading branch information
karel-rehor committed Nov 25, 2024
1 parent d5714cf commit 36888b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions influxdb_client/client/flux_csv_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Parsing response from InfluxDB to FluxStructures or DataFrame."""

import asyncio
import base64
import codecs
import csv as csv_parser
Expand Down Expand Up @@ -147,8 +146,10 @@ async def _parse_flux_response_async(self):
df = self._prepare_data_frame()
if not self._is_profiler_table(metadata.table):
yield df
except (asyncio.exceptions.CancelledError, asyncio.TimeoutError) as ce:
ce.add_note("Stream cancelled during read. Recommended: Check Influxdb client `timeout` setting.")
except BaseException as e:
e_type = type(e).__name__
if "CancelledError" in e_type or "TimeoutError" in e_type:
e.add_note("Stream cancelled during read. Recommended: Check Influxdb client `timeout` setting.")
raise
finally:
self._close()
Expand Down

0 comments on commit 36888b0

Please sign in to comment.