commit db32a6b2f2a64e0bf9cdf1d55a2a7a36d94f7d48
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Jul 9 11:39:22 2015 +0200
Adjust the get_package method to support no returning all the ACLs
pkgdb2client/__init__.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pkgdb2client/__init__.py b/pkgdb2client/__init__.py
index 25d875d..c8fa809 100644
--- a/pkgdb2client/__init__.py
+++ b/pkgdb2client/__init__.py
@@ -520,7 +520,7 @@ class PkgDB(object):
return self.handle_api_call('/collections/', params=args)
- def get_package(self, pkgname, branches=None, eol=False):
+ def get_package(self, pkgname, branches=None, eol=False, acls=True):
''' Return the information of a package matching the provided
criterias.
@@ -534,6 +534,9 @@ class PkgDB(object):
EOL).
If False, it will return results only for non-EOL collections.
:type eol: boolean
+ :kwarg acls: a boolean to specify whether to include ACLs in the
+ data returned. Defaults to ``True``.
+ :type acls: boolean
:return: the json object returned by the API
:rtype: dict
:raise PkgDBException: if the API call does not return a http code
@@ -543,6 +546,7 @@ class PkgDB(object):
args = {
'pkgname': pkgname,
'branches': branches,
+ 'acls': acls,
}
if eol is True:
args['eol'] = eol
Show replies by date