diff options
Diffstat (limited to 'layman/api.py')
-rwxr-xr-x | layman/api.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/layman/api.py b/layman/api.py index 0718dce..20fe402 100755 --- a/layman/api.py +++ b/layman/api.py @@ -237,75 +237,6 @@ class LaymanAPI(object): return True - def get_all_info(self, repos, local=False): - """retrieves the recorded information about the repo(s) - specified by repo-id - - @type repos: list of strings or string - @param repos: ['repo-id1', ...] or 'repo-id' - @rtype list of tuples [(str, bool, bool),...] - @return: dictionary of dictionaries - {'ovl1': - {'name': str, - 'owner_name': str, - 'owner_email': str, - ' homepage': str, - 'description': str, - 'src_uris': list of str ['uri1',...] - 'src_type': str, - 'priority': int, - 'quality': str - 'status':, - 'official': bool, - 'supported': bool, - }, - 'ovl2': {...} - } - """ - - repos = self._check_repo_type(repos, "get_info") - result = {} - - if local: - db = self._get_installed_db() - else: - db = self._get_remote_db() - - for ovl in repos: - if not self.is_repo(ovl): - self.output.error(UnknownOverlayMessage(ovl)) - result[ovl] = ('', False, False) - continue - try: - overlay = db.select(ovl) - except UnknownOverlayException as error: - self._error(error) - result[ovl] = ('', False, False) - else: - result[ovl] = { - 'name': overlay.name, - 'owner_name': overlay.owner_name, - 'owner_email': overlay.owner_email, - 'homepage': overlay.homepage, - 'irc': overlay.irc, - 'description': [e for e in overlay.descriptions], - 'feeds': overlay.feeds, - 'sources': [(e.src, e.type, e.branch) \ - for e in overlay.sources], - #'src_uris': [e.src for e in overlay.sources], - 'src_uris': overlay.source_uris(), - 'src_types': overlay.source_types(), - #'src_types': [e.type for e in overlay.sources], - 'priority': overlay.priority, - 'quality': overlay.quality, - 'status': overlay.status, - 'official': overlay.is_official(), - 'supported': overlay.is_supported(), - } - - return result - - def get_info_str(self, repos, local=True, verbose=False, width=0): """retrieves the string representation of the recorded information about the repo(s) specified by ovl |