Skip to content

Commit

Permalink
fix(embedded): Referecing local variable response before initializati…
Browse files Browse the repository at this point in the history
…on (#20263)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
  • Loading branch information
zhaorui2022 and Rui Zhao committed Jun 6, 2022
1 parent 6f0d53e commit 2a45be3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/utils/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def get_chart_csv_data(
opener.addheaders.append(("Cookie", cookie_str))
response = opener.open(chart_url)
content = response.read()
if response.getcode() != 200:
raise URLError(response.getcode())
if response.getcode() != 200:
raise URLError(response.getcode())
if content:
return content
return None
Expand Down

0 comments on commit 2a45be3

Please sign in to comment.