PEP 8 compliance.
This commit is contained in:
parent
1ee4ea4dc6
commit
70e1a3a39e
1 changed files with 5 additions and 3 deletions
|
@ -54,11 +54,13 @@ class Fetch(dcc.config.Base):
|
|||
if fetcher is None:
|
||||
with urllib.request.urlopen(url) as response:
|
||||
return json.loads(response.read())
|
||||
|
||||
|
||||
fetcher_path = shutil.which(fetcher)
|
||||
if fetcher_path is None:
|
||||
raise Exception(f"Fetch util {fetcher} not found on PATH.")
|
||||
|
||||
proc = subprocess.run([fetcher_path, url], capture_output=True, check = True)
|
||||
proc = subprocess.run(
|
||||
[fetcher_path, url],
|
||||
capture_output=True, check=True
|
||||
)
|
||||
return json.loads(proc.stdout)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue