From 8ac3528d633d8918c7a44b99af96e0db2f48fa75 Mon Sep 17 00:00:00 2001
From: Stefan Froehlich <s.froehlich@fz-juelich.de>
Date: Tue, 13 Oct 2015 14:20:54 +0000
Subject: [PATCH] Task #8623 The python script will now be executed in the
 pipelines working directory.

---
 CEP/Pipeline/recipes/sip/nodes/python_plugin.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CEP/Pipeline/recipes/sip/nodes/python_plugin.py b/CEP/Pipeline/recipes/sip/nodes/python_plugin.py
index 2beb2b16f20..ff3642a1b22 100644
--- a/CEP/Pipeline/recipes/sip/nodes/python_plugin.py
+++ b/CEP/Pipeline/recipes/sip/nodes/python_plugin.py
@@ -71,9 +71,13 @@ class python_plugin(LOFARnodeTCP):
             try:
             # ****************************************************************
             # Run
+                # Change to working directory for the script
+                pipedir = os.getcwd()
+                os.chdir(work_dir)
                 outdict = {}
                 plugin = imp.load_source('main', executable)
                 outdict = plugin.main(*args, **kwargs)
+                os.chdir(pipedir)
 
             except CalledProcessError, err:
                 # CalledProcessError isn't properly propagated by IPython
-- 
GitLab