From 4e16602fd06eab4095b92b5e5d65a4ef0881ceaf Mon Sep 17 00:00:00 2001
From: Conor Finn <conor.finn@stfc.ac.uk>
Date: Wed, 11 Mar 2020 08:57:14 +0000
Subject: [PATCH] RE #27722 Remove other python version checks

---
 .../plugins/algorithms/NMoldyn4Interpolation.py      | 12 ------------
 .../plugins/algorithms/NMoldyn4InterpolationTest.py  |  7 +------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py b/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py
index 6600a2f98ed..99b6d947ea7 100644
--- a/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py
+++ b/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py
@@ -10,8 +10,6 @@ import math
 import numpy as np
 import scipy as sc
 
-from sys import version_info
-
 from mantid.simpleapi import *
 from mantid.kernel import *
 from mantid.api import *
@@ -48,8 +46,6 @@ class NMoldyn4Interpolation(PythonAlgorithm):
                              doc='Output Workspace of remapped simulation data')
 
     def PyExec(self):
-        self.validate_environment()
-
         e_fixed = float(self.getPropertyValue('EFixed'))
         # Loads simulated workspace
         simulation = self.getPropertyValue('InputWorkspace')
@@ -80,14 +76,6 @@ class NMoldyn4Interpolation(PythonAlgorithm):
                         VerticalAxisValues=ref_Q, WorkspaceTitle=output_ws)
         self.setProperty('OutputWorkspace', output_ws)
 
-    def validate_environment(self):
-        # RHEL 6 produces spurious results because it runs on Python 2.6.X
-        # test and warn for this. When RHEL6 is no longer supported this check
-        # can be removed
-        python_version = version_info
-        if python_version < (2, 7, 0):
-            logger.warning("NMoldyn4Interpolation may not run correctly on Python 2.6 and below")
-
     def validate_bounds(self, sim_X, ref_X, sim_Q, ref_Q):
         if min(sim_X) > min(ref_X):
             raise ValueError('Minimum simulated X value is higher than minimum '
diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py
index f69e5edadcc..c875ef038b9 100644
--- a/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py
+++ b/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py
@@ -110,9 +110,4 @@ class NMoldyn4InterpolationTest(unittest.TestCase):
 
 
 if __name__ == "__main__":
-    python_version = version_info
-    if python_version < (2, 7, 0):
-        logger.warning("Not running this test as it requires Python >= 2.7. Version found: {0}".
-                       format(python_version))
-    else:
-        unittest.main()
+    unittest.main()
-- 
GitLab