Skip to content

Commit d893877

Browse files
reduce nesting
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent fb53dd9 commit d893877

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/databricks/sql/cloud_fetch_queue.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,19 @@ def _progress_chunk_link(self):
373373

374374
if next_chunk_index is None:
375375
self._current_chunk_link = None
376-
else:
377-
try:
378-
self._current_chunk_link = self._sea_client.get_chunk_link(
379-
self._statement_id, next_chunk_index
380-
)
381-
except Exception as e:
382-
logger.error(
383-
"SeaCloudFetchQueue: Error fetching link for chunk {}: {}".format(
384-
next_chunk_index, e
385-
)
376+
return None
377+
378+
try:
379+
self._current_chunk_link = self._sea_client.get_chunk_link(
380+
self._statement_id, next_chunk_index
381+
)
382+
except Exception as e:
383+
logger.error(
384+
"SeaCloudFetchQueue: Error fetching link for chunk {}: {}".format(
385+
next_chunk_index, e
386386
)
387-
return None
387+
)
388+
return None
388389

389390
logger.debug(
390391
f"SeaCloudFetchQueue: Progressed to link for chunk {next_chunk_index}: {self._current_chunk_link}"

0 commit comments

Comments
 (0)