diff --git a/OpenTap.Python/PythonInstallAction.cs b/OpenTap.Python/PythonInstallAction.cs index d984580..b3a5f59 100644 --- a/OpenTap.Python/PythonInstallAction.cs +++ b/OpenTap.Python/PythonInstallAction.cs @@ -12,7 +12,10 @@ public class PythonInstallAction : ICustomPackageAction public bool Execute(PackageDef package, CustomPackageActionArgs customActionArgs) { if (PythonInitializer.LoadPython() == false) + { + log.Debug("Unable to load python. Skipping python install actions."); return true; + } using (Py.GIL()) { var opentap = Py.Import("opentap"); diff --git a/OpenTap.Python/PythonSettings.cs b/OpenTap.Python/PythonSettings.cs index 11489b7..feab7b2 100644 --- a/OpenTap.Python/PythonSettings.cs +++ b/OpenTap.Python/PythonSettings.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Reflection; +using OpenTap.Package; namespace OpenTap.Python { @@ -43,7 +44,7 @@ public class PythonSettings : ComponentSettings public string[] GetSearchList() { var lst = new List(); - var dir = Path.GetDirectoryName(typeof(TestPlan).Assembly.Location); + var dir = Installation.Current.Directory; lst.Add(dir); var dir2 = Path.Combine(dir, "Packages", "Python"); if (Directory.Exists(dir2))