summaryrefslogtreecommitdiffstats
path: root/layman/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'layman/api.py')
-rwxr-xr-xlayman/api.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/layman/api.py b/layman/api.py
index fefb6a0..869d882 100755
--- a/layman/api.py
+++ b/layman/api.py
@@ -22,6 +22,7 @@ from layman.config import BareConfig
from layman.dbbase import UnknownOverlayException, UnknownOverlayMessage
from layman.db import DB, RemoteDB
+from layman.overlays.source import require_supported
#from layman.utils import path, delete_empty_directory
# give them some values for now, these are from the packagekit backend
@@ -499,6 +500,17 @@ class LaymanAPI(object):
return messages
return []
+ def supported_types(self):
+ """returns a dictionary of all repository types,
+ with boolean values"""
+ cmds = [x for x in self.config.keys() if '_command' in x]
+ supported = {}
+ for cmd in cmds:
+ type_key = cmd.split('_')[0]
+ supported[type_key] = require_supported(
+ [(self.config[cmd],type_key, '')], self.output.warn)
+ return supported
+
def create_fd():
"""creates file descriptor pairs an opens them ready for