diff options
author | 2011-01-17 23:58:04 -0800 | |
---|---|---|
committer | 2011-02-12 19:48:34 -0800 | |
commit | 2dd23d2be98537bebe647340a6ba6c6f88578300 (patch) | |
tree | a7fa96b3c02084b0431a315fe2457dc7ffe572f5 | |
parent | add missing output statements, debug all the new actions (diff) | |
download | layman-2dd23d2be98537bebe647340a6ba6c6f88578300.tar.gz layman-2dd23d2be98537bebe647340a6ba6c6f88578300.tar.bz2 layman-2dd23d2be98537bebe647340a6ba6c6f88578300.zip |
add a list_ids() and use the it
-rw-r--r-- | layman/api.py | 4 | ||||
-rw-r--r-- | layman/dbbase.py | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/layman/api.py b/layman/api.py index ef5fc5b..d97bf8e 100644 --- a/layman/api.py +++ b/layman/api.py @@ -385,14 +385,14 @@ class LaymanAPI(object): def get_available(self, reload=False): """returns the list of available overlays""" if self._available_ids is None or reload: - self._available_ids = sorted(self._get_remote_db(reload).overlays) + self._available_ids = self._get_remote_db(reload).list_ids() return self._available_ids[:] or ['None'] def get_installed(self, reload=False): """returns the list of installed overlays""" if self._installed_ids is None or reload: - self._installed_ids = sorted(self._get_installed_db(reload).overlays) + self._installed_ids = self._get_installed_db(reload).list_ids() return self._installed_ids[:] diff --git a/layman/dbbase.py b/layman/dbbase.py index 7eaa1cf..3532062 100644 --- a/layman/dbbase.py +++ b/layman/dbbase.py @@ -252,6 +252,12 @@ class DbBase: return result + def list_ids(self): + """returns a list of the overlay names + """ + return sorted(self.overlays) + + #=============================================================================== # # Testing |