diff bin/sat @ 3053:8b36e5c3f28f

misc: don't import memory in launch script: launch script was importing a method from memory (fixLocalDir), but memory is importing twisted.internet.reactor which can result to a ReactorAlreadyInstalledError. This patch fixes it by moving fixLocalDir to tools/config. The launch script is now using /usr/bin/env.
author Goffi <goffi@goffi.org>
date Tue, 08 Oct 2019 12:10:26 +0200
parents ab2696e34d29
children 0b6d56a8f7e3
line wrap: on
line diff
--- a/bin/sat	Mon Oct 07 17:29:28 2019 +0200
+++ b/bin/sat	Tue Oct 08 12:10:26 2019 +0200
@@ -26,9 +26,9 @@
 }
 
 #We use python to parse config files
-eval `"$PYTHON" << PYTHONEND
+eval `/usr/bin/env "$PYTHON" << PYTHONEND
 from sat.core.constants import Const as C
-from sat.memory.memory import fixLocalDir
+from sat.tools.config import fixLocalDir
 from configparser import ConfigParser
 from os.path import expanduser, join
 import sys
@@ -100,4 +100,4 @@
     mkdir $log_dir
 fi
 
-exec $PYTHON $TWISTD $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE
+exec /usr/bin/env $PYTHON $TWISTD $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE