Skip to content

Commit 9a13254

Browse files
committed
Add optional parameter to resolve env reference
1 parent 760d474 commit 9a13254

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/mujinwebstackclient/webstackclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,15 +778,15 @@ def FileExists(self, path, timeout=5):
778778
raise WebstackClientError(_('Failed to check file existence, status code is %d') % response.status_code, response=response)
779779
return response.status_code != 404
780780

781-
def DownloadFile(self, filename, ifmodifiedsince=None, timeout=5):
781+
def DownloadFile(self, filename, ifmodifiedsince=None, resolveReferences=False, timeout=5):
782782
"""Downloads a file given filename
783783
784784
:return: A streaming response
785785
"""
786786
headers = {}
787787
if ifmodifiedsince:
788788
headers['If-Modified-Since'] = _FormatHTTPDate(ifmodifiedsince)
789-
response = self._webclient.Request('GET', u'/u/%s/%s' % (self.controllerusername, filename), headers=headers, stream=True, timeout=timeout)
789+
response = self._webclient.Request('GET', u'/u/%s/%s?resolveReferences=%s' % (self.controllerusername, filename, str(resolveReferences).lower()), headers=headers, stream=True, timeout=timeout)
790790
if ifmodifiedsince and response.status_code == 304:
791791
return response
792792
if response.status_code != 200:

0 commit comments

Comments
 (0)