diff options
| author | Scott Bahling <sbahling@suse.de> | 2018-07-18 17:23:15 +0200 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.de> | 2018-07-18 17:23:15 +0200 |
| commit | 84de1851f6982ca73a2f82eb382ff3f13742e31f (patch) | |
| tree | 21ecd79718b597d35b843924939a343f77073c99 /obsapi/httpapi.py | |
| parent | 243c10a0283e0b93104f106fb78f151beb54aa38 (diff) | |
| download | obsapi-84de1851f6982ca73a2f82eb382ff3f13742e31f.tar.gz obsapi-84de1851f6982ca73a2f82eb382ff3f13742e31f.tar.xz obsapi-84de1851f6982ca73a2f82eb382ff3f13742e31f.zip | |
Handle retrieving binary files properly
Diffstat (limited to 'obsapi/httpapi.py')
| -rw-r--r-- | obsapi/httpapi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/obsapi/httpapi.py b/obsapi/httpapi.py index 4b0ab65..8ef893e 100644 --- a/obsapi/httpapi.py +++ b/obsapi/httpapi.py @@ -110,11 +110,15 @@ class ObsHttpApi(object): return '/'.join(['{}'] * len(args)).format(*args) def get(self, *args, **params): + binary_get = params.pop('binary_get', False) api = self.__api(*args) r = self.__api_get(api, params=params) if not self.success: return self.default_xml + if binary_get: + return r.content + return r.text def put(self, *args, **kwargs): |
