Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions OpenTap.Python/PythonInstallAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 2 additions & 1 deletion OpenTap.Python/PythonSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using OpenTap.Package;

namespace OpenTap.Python
{
Expand Down Expand Up @@ -43,7 +44,7 @@ public class PythonSettings : ComponentSettings<PythonSettings>
public string[] GetSearchList()
{
var lst = new List<string>();
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))
Expand Down