fix(embedded): Referecing local variable response before initialization (#20263)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
This commit is contained in:
Rui Zhao 2022-06-06 14:05:47 -07:00 committed by GitHub
parent 6f0d53eed8
commit 2a45be3996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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