Skip to content

Commit

Permalink
Use modules from python
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Dec 18, 2024
1 parent 57b18a1 commit 706d4da
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/id27.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
import pyFAI
from dahu.plugin import Plugin
from dahu.factory import register

# This is a security hole ... but I was told to use modules
exec(open(os.environ["MODULESHOME"] + "/init/python.py").read())
# Shame should go to the people who enforce the usage of modules
module("load", "xds")

lock = Semaphore()
logger = logging.getLogger("id27")

Expand Down Expand Up @@ -774,9 +780,7 @@ def process(self):
res = subprocess.run(parameters, capture_output=True, check=False)
self.output["convert"] = unpack_processed(res)
if res.returncode == 0:
# Implement the tuning of the XDS.INP file here...
res = subprocess.run(["module","load","xds"],capture_output=True, check=True)
self.output["module"] = unpack_processed(res)
# Implement the tuning of the XDS.INP file here...
res = subprocess.run(XDS_EXE, cwd=dest_dir, capture_output=True, check=False)
self.output["xds"] = unpack_processed(res)

0 comments on commit 706d4da

Please sign in to comment.