Skip to content

Commit

Permalink
Formatted string mistake
Browse files Browse the repository at this point in the history
Signed-off-by: SystemsPurge <[email protected]>
  • Loading branch information
SystemsPurge committed Nov 7, 2024
1 parent 47848dc commit da9222d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions villas/controller/components/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _upload(self, filename):
url = self.results['url']
params={"url":url}
if "token" in self.results:
params["headers"] = {"Authorization":f"Bearer {self.model["token"]}"}
params["headers"] = {"Authorization":f"Bearer {self.results['token']}"}
with open(filename, 'rb') as f:
params["body"] = f
r = requests.put(url, body=f)
Expand All @@ -124,7 +124,7 @@ def _upload(self, filename):
def _download(self, url):
params = {"url":url,"stream":True}
if "token" in self.model:
params["headers"] = {"Authorization":f"Bearer {self.model["token"]}"}
params["headers"] = {"Authorization":f"Bearer {self.model['token']}"}
with requests.get(**params) as r:
r.raise_for_status()
with tempfile.NamedTemporaryFile(delete=False, suffix='.xml') as f:
Expand Down

0 comments on commit da9222d

Please sign in to comment.