mirror of https://github.com/apache/superset.git
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