Skip to content

Commit 083f2c7

Browse files
Sascha HolzhauerSascha Holzhauer
authored andcommitted
docs/client.py and docs/service.py: also checking for lower case
"export" in uri (due to changes to google API)
1 parent b0f6855 commit 083f2c7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/gdata/docs/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def download_resource_to_memory(self, entry, extra_params=None, **kwargs):
397397
def _get_download_uri(self, base_uri, extra_params=None):
398398
uri = base_uri.replace('&', '&')
399399
if extra_params is not None:
400-
if 'exportFormat' in extra_params and '/Export?' not in uri:
400+
if 'exportFormat' in extra_params and '/Export?' not in uri and '/export?' not in uri:
401401
raise gdata.client.Error, ('This entry type cannot be exported '
402402
'as a different format.')
403403

src/gdata/docs/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def Download(self, entry_or_id_or_url, file_path, export_format=None,
331331
url = entry_or_id_or_url
332332

333333
if export_format is not None:
334-
if url.find('/Export?') == -1:
334+
if (url.find('/Export?') == -1) and (url.find('/export?') == -1):
335335
raise gdata.service.Error, ('This entry cannot be exported '
336336
'as a different format')
337337
url += '&exportFormat=%s' % export_format

0 commit comments

Comments
 (0)