Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/activity')
-rw-r--r--sugar/activity/bundleregistry.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sugar/activity/bundleregistry.py b/sugar/activity/bundleregistry.py
index aa7d70a..8b7c44a 100644
--- a/sugar/activity/bundleregistry.py
+++ b/sugar/activity/bundleregistry.py
@@ -33,6 +33,13 @@ class BundleRegistry:
else:
return None
+ def find_by_default_type(self, default_type):
+ """Find a bundle by the network service default type"""
+ for bundle in self._bundles.values():
+ if bundle.get_default_type() == default_type:
+ return bundle
+ return None
+
def add_search_path(self, path):
"""Add a directory to the bundles search path"""
self._search_path.append(path)