Ticket #90: 0001-Simplify-activity-bundle-installation.patch

File 0001-Simplify-activity-bundle-installation.patch, 1.3 KB (added by dsd, 15 years ago)

patch

  • src/sugar/bundle/activitybundle.py

    From 3f1509cd225383ce738eb2bd1ee8e20f9b7c7824 Mon Sep 17 00:00:00 2001
    From: Daniel Drake <dsd@laptop.org>
    Date: Fri, 5 Dec 2008 21:55:34 +0000
    Subject: [PATCH] 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.
    ---
     src/sugar/bundle/activitybundle.py |    6 +++++-
     1 files changed, 5 insertions(+), 1 deletions(-)
    
    diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
    index 97acc70..082fb70 100644
    a b import os 
    2626import tempfile
    2727import logging
    2828
     29from sugar import env
    2930from sugar.bundle.bundle import Bundle, \
    3031    MalformedBundleException, NotInstalledException
    3132
    class ActivityBundle(Bundle): 
    275276        """Get whether there should be a visible launcher for the activity"""
    276277        return self._show_launcher
    277278
    278     def install(self, install_dir, strict_manifest=False):
     279    def install(self, install_dir=None, strict_manifest=False):
     280        if install_dir is None:
     281            install_dir = env.get_user_activities_path()
     282
    279283        self._unzip(install_dir)
    280284
    281285        install_path = os.path.join(install_dir, self._zip_root_dir)