Simplify activity bundle installation
sugar-install-bundle is broken because ActivityBundle.install() gained a required parameter. Please can we make it optional? This also fixes one of the problems with the activity updater.
This commit is contained in:
parent
e0c2017c50
commit
3f1509cd22
@ -26,6 +26,7 @@ import os
|
|||||||
import tempfile
|
import tempfile
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from sugar import env
|
||||||
from sugar.bundle.bundle import Bundle, \
|
from sugar.bundle.bundle import Bundle, \
|
||||||
MalformedBundleException, NotInstalledException
|
MalformedBundleException, NotInstalledException
|
||||||
|
|
||||||
@ -275,7 +276,10 @@ class ActivityBundle(Bundle):
|
|||||||
"""Get whether there should be a visible launcher for the activity"""
|
"""Get whether there should be a visible launcher for the activity"""
|
||||||
return self._show_launcher
|
return self._show_launcher
|
||||||
|
|
||||||
def install(self, install_dir, strict_manifest=False):
|
def install(self, install_dir=None, strict_manifest=False):
|
||||||
|
if install_dir is None:
|
||||||
|
install_dir = env.get_user_activities_path()
|
||||||
|
|
||||||
self._unzip(install_dir)
|
self._unzip(install_dir)
|
||||||
|
|
||||||
install_path = os.path.join(install_dir, self._zip_root_dir)
|
install_path = os.path.join(install_dir, self._zip_root_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user