Check activities dir exists
This commit is contained in:
parent
b67a967699
commit
3e1f404879
@ -23,15 +23,16 @@ def start(console):
|
|||||||
activities_dirs.append(os.path.expanduser('~/.sugar/activities'))
|
activities_dirs.append(os.path.expanduser('~/.sugar/activities'))
|
||||||
|
|
||||||
for activities_dir in activities_dirs:
|
for activities_dir in activities_dirs:
|
||||||
for filename in os.listdir(activities_dir):
|
if os.path.isdir(activities_dir):
|
||||||
if filename.endswith(".activity"):
|
for filename in os.listdir(activities_dir):
|
||||||
path = os.path.join(activities_dir, filename)
|
if filename.endswith(".activity"):
|
||||||
|
path = os.path.join(activities_dir, filename)
|
||||||
|
|
||||||
cp = ConfigParser()
|
cp = ConfigParser()
|
||||||
cp.read([path])
|
cp.read([path])
|
||||||
python_class = cp.get('Activity', "python_class")
|
python_class = cp.get('Activity', "python_class")
|
||||||
|
|
||||||
activities.append(python_class)
|
activities.append(python_class)
|
||||||
|
|
||||||
for activity in activities:
|
for activity in activities:
|
||||||
args = [ 'python', '-m', activity ]
|
args = [ 'python', '-m', activity ]
|
||||||
|
Loading…
Reference in New Issue
Block a user