Don't crash if bundles dir doesn't exist in the profiles
This commit is contained in:
parent
9a0401e0d0
commit
b44dac1010
@ -25,10 +25,12 @@ class BundleRegistry:
|
|||||||
return self._bundles.values().__iter__()
|
return self._bundles.values().__iter__()
|
||||||
|
|
||||||
def _scan_directory(self, path):
|
def _scan_directory(self, path):
|
||||||
for f in os.listdir(path):
|
if os.path.isdir(path):
|
||||||
bundle_dir = os.path.join(path, f)
|
for f in os.listdir(path):
|
||||||
if os.path.isdir(bundle_dir) and bundle_dir.endswith('.activity'):
|
bundle_dir = os.path.join(path, f)
|
||||||
self._add_bundle(bundle_dir)
|
if os.path.isdir(bundle_dir) and \
|
||||||
|
bundle_dir.endswith('.activity'):
|
||||||
|
self._add_bundle(bundle_dir)
|
||||||
|
|
||||||
def _add_bundle(self, bundle_dir):
|
def _add_bundle(self, bundle_dir):
|
||||||
info_path = os.path.join(bundle_dir, 'activity.info')
|
info_path = os.path.join(bundle_dir, 'activity.info')
|
||||||
|
Loading…
Reference in New Issue
Block a user