refs #1144 the call to variables from the language file is modified

pull/1/head
Antonio Guerrero 2024-11-13 14:11:36 -06:00
parent 6b83fe3f04
commit c03455a32f
1 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@ import sys
sys.path.append('/opt/opengnsys/lib/engine/bin')
import ogGlobals
import SystemLib
def main(arg1, arg2, dest_file):
start_time = time.time()
@ -20,9 +21,9 @@ def main(arg1, arg2, dest_file):
with open(f"{og_log_command}.tmp", 'w') as f:
f.write(" ")
msg_interface_start = os.getenv(ogGlobals.MSG_INTERFACE_START)
msg_interface_start = os.getenv(ogGlobals.lang.MSG_INTERFACE_START)
if msg_interface_start:
subprocess.run(['ogEcho', 'log', 'session', f"{msg_interface_start} {__file__} {arg1} {arg2}"])
SystemLib.ogEcho("log", "session", f"{msg_interface_start} {__file__} {arg1} {arg2}")
try:
result = subprocess.run(
@ -40,9 +41,9 @@ def main(arg1, arg2, dest_file):
shutil.copy(file, dest_file)
elapsed_time = time.time() - start_time
msg_scripts_time_partial = os.getenv('MSG_SCRIPTS_TIME_PARTIAL')
msg_scripts_time_partial = os.getenv(ogGlobals.lang.MSG_SCRIPTS_TIME_PARTIAL)
if msg_scripts_time_partial:
subprocess.run(['ogEcho', 'log', 'session', f" [ ] {msg_scripts_time_partial} : {int(elapsed_time // 60)}m {int(elapsed_time % 60)}s"])
SystemLib.ogEcho("log", "session", f" [ ] {msg_scripts_time_partial} : {int(elapsed_time // 60)}m {int(elapsed_time % 60)}s")
if __name__ == "__main__":
if len(sys.argv) != 4: