summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2019-01-19 14:10:24 +0100
committerGitHub <noreply@github.com>2019-01-19 14:10:24 +0100
commit52d76312660109d3669d459b11b448a3a60b9603 (patch)
treee14cef27760e1c022e68757c88a5eca296c580bc /gitlab/v4/objects.py
parentca8c85cf3ed4d4d62fc86a3b52ea8a5c4f2d0cd0 (diff)
parent35a6d85acea4776e9c4ad23ff75259481a6bcf8d (diff)
downloadgitlab-52d76312660109d3669d459b11b448a3a60b9603.tar.gz
Merge pull request #687 from python-gitlab/fix/683/raw_download
fix(api): Don't try to parse raw downloads
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index fd673b5..c3714d8 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1128,7 +1128,7 @@ class Snippet(UserAgentDetailMixin, SaveMixin, ObjectDeleteMixin, RESTObject):
"""
path = '/snippets/%s/raw' % self.get_id()
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@@ -1365,7 +1365,7 @@ class ProjectJob(RESTObject, RefreshMixin):
"""
path = '%s/%s/artifacts' % (self.manager.path, self.get_id())
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@cli.register_custom_action('ProjectJob')
@@ -1393,7 +1393,7 @@ class ProjectJob(RESTObject, RefreshMixin):
"""
path = '%s/%s/artifacts/%s' % (self.manager.path, self.get_id(), path)
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@cli.register_custom_action('ProjectJob')
@@ -1419,7 +1419,7 @@ class ProjectJob(RESTObject, RefreshMixin):
"""
path = '%s/%s/trace' % (self.manager.path, self.get_id())
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@@ -2654,7 +2654,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin,
path = '%s/%s/raw' % (self.path, file_path)
query_data = {'ref': ref}
result = self.gitlab.http_get(path, query_data=query_data,
- streamed=streamed, **kwargs)
+ streamed=streamed, raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@@ -2897,7 +2897,7 @@ class ProjectSnippet(UserAgentDetailMixin, SaveMixin, ObjectDeleteMixin,
"""
path = "%s/%s/raw" % (self.manager.path, self.get_id())
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@@ -3174,7 +3174,7 @@ class ProjectExport(RefreshMixin, RESTObject):
"""
path = '/projects/%d/export/download' % self.project_id
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@@ -3315,7 +3315,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
"""
path = '/projects/%s/repository/blobs/%s/raw' % (self.get_id(), sha)
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@cli.register_custom_action('Project', ('from_', 'to'))
@@ -3391,7 +3391,8 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
if sha:
query_data['sha'] = sha
result = self.manager.gitlab.http_get(path, query_data=query_data,
- streamed=streamed, **kwargs)
+ raw=True, streamed=streamed,
+ **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@cli.register_custom_action('Project', ('forked_from_id', ))
@@ -3674,7 +3675,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
"""
path = '/projects/%d/snapshot' % self.get_id()
result = self.manager.gitlab.http_get(path, streamed=streamed,
- **kwargs)
+ raw=True, **kwargs)
return utils.response_content(result, streamed, action, chunk_size)
@cli.register_custom_action('Project', ('scope', 'search'))