From 495eed8737afa53e13878929e386c3e604a65818 Mon Sep 17 00:00:00 2001 From: James Cameron Date: Mon, 27 Mar 2017 19:07:37 +1100 Subject: [PATCH] Prepend instead of append to path When an activity is launched, an import should first search the activity bundle source rather than /usr/bin Fixes the need to change activity sources every time a system package conflicts with an import. May impact any activity that relies on a system package being in search path before the bundle source. Forty activities were tested, and none relied on this. --- bin/sugar-activity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sugar-activity b/bin/sugar-activity index 1424033b..e8d9c008 100755 --- a/bin/sugar-activity +++ b/bin/sugar-activity @@ -114,7 +114,7 @@ def main(): os.environ['SUGAR_BUNDLE_PATH'] = os.path.abspath(os.curdir) bundle_path = os.environ['SUGAR_BUNDLE_PATH'] - sys.path.append(bundle_path) + sys.path.insert(0, bundle_path) try: bundle = ActivityBundle(bundle_path)