File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
villas/controller/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ def _upload(self, filename):
113
113
url = self .results ['url' ]
114
114
params = {"url" :url }
115
115
if "token" in self .results :
116
- params ["headers" ] = {"Authorization" :f"Bearer { self .model [ " token" ]} " }
116
+ params ["headers" ] = {"Authorization" :f"Bearer { self .results [ ' token' ]} " }
117
117
with open (filename , 'rb' ) as f :
118
118
params ["body" ] = f
119
119
r = requests .put (url , body = f )
@@ -124,7 +124,7 @@ def _upload(self, filename):
124
124
def _download (self , url ):
125
125
params = {"url" :url ,"stream" :True }
126
126
if "token" in self .model :
127
- params ["headers" ] = {"Authorization" :f"Bearer { self .model [" token" ]} " }
127
+ params ["headers" ] = {"Authorization" :f"Bearer { self .model [' token' ]} " }
128
128
with requests .get (** params ) as r :
129
129
r .raise_for_status ()
130
130
with tempfile .NamedTemporaryFile (delete = False , suffix = '.xml' ) as f :
You can’t perform that action at this time.
0 commit comments