Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 083f2c7

Browse files
Sascha HolzhauerSascha Holzhauer
Sascha Holzhauer
authored and
Sascha Holzhauer
committed
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

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎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 uriand'/export?'notinuri:
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)

AltStyle によって変換されたページ (->オリジナル) /