mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix(embedded): Referecing local variable response before initialization (#20263)
Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
This commit is contained in:
parent
6f0d53eed8
commit
2a45be3996
@ -85,8 +85,8 @@ def get_chart_csv_data(
|
|||||||
opener.addheaders.append(("Cookie", cookie_str))
|
opener.addheaders.append(("Cookie", cookie_str))
|
||||||
response = opener.open(chart_url)
|
response = opener.open(chart_url)
|
||||||
content = response.read()
|
content = response.read()
|
||||||
if response.getcode() != 200:
|
if response.getcode() != 200:
|
||||||
raise URLError(response.getcode())
|
raise URLError(response.getcode())
|
||||||
if content:
|
if content:
|
||||||
return content
|
return content
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user