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))
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue