From ea57c217ea0c2a5637343ce70b9608f64d8c1ca8 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 17 Jan 2022 10:45:10 +0100
Subject: [PATCH] L2SS_497: Mention hint before the code its relevant to, not
 after

---
 tangostationcontrol/tangostationcontrol/common/measures.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tangostationcontrol/tangostationcontrol/common/measures.py b/tangostationcontrol/tangostationcontrol/common/measures.py
index eb2489d61..b659d05fa 100644
--- a/tangostationcontrol/tangostationcontrol/common/measures.py
+++ b/tangostationcontrol/tangostationcontrol/common/measures.py
@@ -86,9 +86,9 @@ def restart_python():
         This function does not return. """
 
     exe_path = pathlib.Path(sys.executable)
-    os.execv(exe_path, [exe_path.name] + sys.argv)
 
     # NOTE: Python 3.4+ closes all file descriptors > 2 automatically, see https://www.python.org/dev/peps/pep-0446/
+    os.execv(exe_path, [exe_path.name] + sys.argv)
 
 def get_available_measures_directories() -> list:
     """ Returns the set of installed measures tables. """
-- 
GitLab