Don't crash if bundles dir doesn't exist in the profiles

This commit is contained in:
Marco Pesenti Gritti 2006-10-29 21:03:28 +01:00
parent 9a0401e0d0
commit b44dac1010

View File

@ -25,9 +25,11 @@ class BundleRegistry:
return self._bundles.values().__iter__()
def _scan_directory(self, path):
if os.path.isdir(path):
for f in os.listdir(path):
bundle_dir = os.path.join(path, f)
if os.path.isdir(bundle_dir) and bundle_dir.endswith('.activity'):
if os.path.isdir(bundle_dir) and \
bundle_dir.endswith('.activity'):
self._add_bundle(bundle_dir)
def _add_bundle(self, bundle_dir):