From f2213c9523e96964a17430ca788c5fc880b96612 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Tue, 28 Jan 2020 16:58:42 +0100 Subject: Enable calling /source/ root api (project argument optional) Also enable the binary_get flag when retrieving file objects --- obsapi/sourceapi.py | 6 ++++-- 1 file 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) -- cgit v1.2.3