refs #1144 the call to variables from the language file is modified
parent
6b83fe3f04
commit
c03455a32f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue