This is an automated email from the ASF dual-hosted git repository.
bkyryliuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2a45be3996 fix(embedded): Referecing local variable response before
initialization (#20263)
2a45be3996 is described below
commit 2a45be39968ad978748e541c08b8ab7c6daa1526
Author: Rui Zhao <[email protected]>
AuthorDate: Mon Jun 6 14:05:47 2022 -0700
fix(embedded): Referecing local variable response before initialization
(#20263)
Co-authored-by: Rui Zhao <[email protected]>
---
superset/utils/csv.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset/utils/csv.py b/superset/utils/csv.py
index 31f076bfc6..914ab8cf56 100644
--- a/superset/utils/csv.py
+++ b/superset/utils/csv.py
@@ -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