summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Bahling <sbahling@suse.com>2020-01-28 16:58:42 +0100
committerScott Bahling <sbahling@suse.com>2020-01-28 16:58:42 +0100
commitf2213c9523e96964a17430ca788c5fc880b96612 (patch)
treeb347ae4c735ddaf80b4201e443fc13a3e168f3b5
parent795dea374e581d7e227971311a05439ca7bada2a (diff)
downloadobsapi-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
-rw-r--r--obsapi/sourceapi.py6
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)