]> git.ipfire.org Git - pakfire.git/commitdiff
PakfireContext: Add shortcut to repos
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Dec 2016 22:29:02 +0000 (23:29 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Dec 2016 22:29:02 +0000 (23:29 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/base.py

index 022efbb5abf775ccc0f90295656f98c479b574e9..4b307f42b17a4813c28f906b04131d8419f668d7 100644 (file)
@@ -145,6 +145,14 @@ class PakfireContext(object):
        def __init__(self, pakfire):
                self.pakfire = pakfire
 
+       @property
+       def repos(self):
+               """
+                       Shortcut to access any configured
+                       repositories for this Pakfire instance
+               """
+               return self.pakfire.repos
+
        def check(self, allow_downgrade=True, allow_uninstall=True):
                """
                        Try to fix any errors in the system.