diff options
| author | Scott Bahling <sbahling@suse.com> | 2020-01-28 16:58:42 +0100 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.com> | 2020-01-28 16:58:42 +0100 |
| commit | f2213c9523e96964a17430ca788c5fc880b96612 (patch) | |
| tree | b347ae4c735ddaf80b4201e443fc13a3e168f3b5 /obsapi/sourceapi.py | |
| parent | 795dea374e581d7e227971311a05439ca7bada2a (diff) | |
| download | obsapi-f2213c9523e96964a17430ca788c5fc880b96612.tar.gz obsapi-f2213c9523e96964a17430ca788c5fc880b96612.tar.xz obsapi-f2213c9523e96964a17430ca788c5fc880b96612.zip | |
Enable calling /source/ root api (project argument optional)
Also enable the binary_get flag when retrieving file objects
Diffstat (limited to 'obsapi/sourceapi.py')
| -rw-r--r-- | obsapi/sourceapi.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/obsapi/sourceapi.py b/obsapi/sourceapi.py index b49712d..890ac52 100644 --- a/obsapi/sourceapi.py +++ b/obsapi/sourceapi.py @@ -16,8 +16,10 @@ class ObsSourceApi(ObsHttpApi): def __post(self, *args, **kwargs): return super(ObsSourceApi, self).post(*args, **kwargs) - def get(self, prj, pkg=None, filename=None, **kwargs): - return self.__get(prj, pkg, filename, **kwargs) + def get(self, prj=None, pkg=None, filename=None, binary_get=None, **kwargs): + if filename: + binary_get=True + return self.__get(prj, pkg, filename, binary_get=binary_get, **kwargs) def put(self, prj, pkg=None, filename=None, data=None, **kwargs): return self.__put(prj, pkg, filename, data, **kwargs) |
