diff options
author | Bert Freudenberg <bert@ubuntu.(none)> | 2007-05-17 11:18:56 (GMT) |
---|---|---|
committer | Bert Freudenberg <bert@ubuntu.(none)> | 2007-05-17 11:18:56 (GMT) |
commit | 6dd2f7109c2e955ef5649eddf60fefb6bc1f63bd (patch) | |
tree | ea0ce4009e4d3e7c60d4e779117078b148b31db1 /sugar | |
parent | 3a1d514e9fa197e0c13c7763b5ace9fc56342a61 (diff) |
Find executable in bundle (approved by marcopg, fix for #1362)
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/activity/bundle.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index 98b9e9a..d3c490f 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -78,10 +78,14 @@ class Bundle: if cp.has_option(section, 'class'): self._class = cp.get(section, 'class') self._exec = '%s --bundle-path="%s"' % ( - env.get_bin_path(_PYTHON_FACTORY), self.get_path()) + env.get_bin_path(_PYTHON_FACTORY), self._path) elif cp.has_option(section, 'exec'): self._class = None - self._exec = cp.get(section, 'exec') + cmdline = cp.get(section, 'exec') + cmdline = os.path.join(self._path, cmdline) + cmdline = cmdline.replace('$SUGAR_BUNDLE_PATH', self._path) + cmdline = os.path.expandvars(cmdline) + self._exec = cmdline else: self._exec = None self._valid = False |