Skip to content

Commit 35a1457

Browse files
committed
Merge pull request google#9 from Holzhauer/master
checking for lower case "export" in uri (due to changes to google API)
2 parents 79d2d3c + 083f2c7 commit 35a1457

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 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
@@ -330,7 +330,7 @@ def Download(self, entry_or_id_or_url, file_path, export_format=None,
330330
url = entry_or_id_or_url
331331

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

0 commit comments

Comments
 (0)