Commit 97283501 authored by Blaise Thompson's avatar Blaise Thompson
Browse files

Merge branch 'file_id_var' into 'master'

Fix file_id variable name in format strings

See merge request !18
parents ca9e1112 a9665787
Pipeline #172695108 passed with stage
in 1 minute and 29 seconds
...@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ...@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Fixed ### Fixed
- Signature of `update_file` - Signature of `update_file`
- Variable name `file_id` when formatting urls
## [2020.05.0] ## [2020.05.0]
......
...@@ -167,7 +167,7 @@ class GDrive(yaqd_core.Base): ...@@ -167,7 +167,7 @@ class GDrive(yaqd_core.Base):
with open(file_, "rb") as f: with open(file_, "rb") as f:
mpwriter.append(f.read()) mpwriter.append(f.read())
async with self._http_session.patch( async with self._http_session.patch(
self._update_file_url.format(fileId=id), self._update_file_url.format(file_id=id),
headers=self._auth_header, headers=self._auth_header,
params={"uploadType": "multipart"}, params={"uploadType": "multipart"},
data=mpwriter, data=mpwriter,
...@@ -286,10 +286,10 @@ class GDrive(yaqd_core.Base): ...@@ -286,10 +286,10 @@ class GDrive(yaqd_core.Base):
return drive_id return drive_id
def id_to_open_url(self, id): def id_to_open_url(self, id):
return self._open_url.format(fileId=self._state["id_mapping"].get(id, id)) return self._open_url.format(file_id=self._state["id_mapping"].get(id, id))
def id_to_download_url(self, id): def id_to_download_url(self, id):
return self._download_url.format(fileId=self._state["id_mapping"].get(id, id)) return self._download_url.format(file_id=self._state["id_mapping"].get(id, id))
def create_folder(self, path, parent_id=None, id=None): def create_folder(self, path, parent_id=None, id=None):
path = pathlib.Path(path) path = pathlib.Path(path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment