Ticket #1098: 0001-journalentrybundle.install-use-install_dir-param.patch

File 0001-journalentrybundle.install-use-install_dir-param.patch, 1.3 KB (added by martin.langhoff, 14 years ago)
  • src/jarabe/journal/journalentrybundle.py

    From dd707a246e304d6e3d9db08bd51a1ed66543ac2a Mon Sep 17 00:00:00 2001
    From: root <root@localhost.localdomain>
    Date: Tue, 10 Nov 2009 16:25:45 +0000
    Subject: [PATCH] journalentrybundle.install(): use install_dir param, remove old code
    
    The fix from SL#1098 was ignoring the provided param value.
    
    Use it, and remove the superfluous internal lookup of the same
    value.
    ---
     src/jarabe/journal/journalentrybundle.py |    7 +------
     1 files changed, 1 insertions(+), 6 deletions(-)
    
    diff --git a/src/jarabe/journal/journalentrybundle.py b/src/jarabe/journal/journalentrybundle.py
    index ebe7ec3..3bc1430 100644
    a b class JournalEntryBundle(Bundle): 
    4040    def __init__(self, path):
    4141        Bundle.__init__(self, path)
    4242
    43     def install(self, install_path):
    44         if os.environ.has_key('SUGAR_ACTIVITY_ROOT'):
    45             install_dir = os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'],
    46                                        'data')
    47         else:
    48             install_dir = tempfile.gettempdir()
     43    def install(self, install_dir):
    4944        bundle_dir = os.path.join(install_dir, self._zip_root_dir)
    5045        uid = self._zip_root_dir
    5146        self._unzip(install_dir)