File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -68,12 +68,15 @@ def read_config(config_file):
6868def install (msi_file , target_folder , command_line ):
6969 command_line = list (map (lambda x : x .replace ("$MSI-FILE" , msi_file ), command_line ))
7070 print (f"- Installing NSClient++: { ' ' .join (command_line )} " , flush = True )
71- process = run (command_line )
72- if process .returncode == 0 :
73- print ("- Installation completed successfully." , flush = True )
74- else :
75- print (f"! The exit code was: { process .returncode } " , flush = True )
76- exit (1 )
71+ try :
72+ process = run (command_line , timeout = 120 )
73+ if process .returncode == 0 :
74+ print ("- Installation completed successfully." , flush = True )
75+ else :
76+ print (f"! The exit code was: { process .returncode } " , flush = True )
77+ exit (1 )
78+ except Exception as e :
79+ print (f"! Install failed: { e } " , flush = True )
7780
7881 if path .exists (target_folder ) and path .isdir (target_folder ) and path .exists (path .join (target_folder , "nscp.exe" )):
7982 print (f"- Installation seems successfully: { target_folder } " , flush = True )
You can’t perform that action at this time.
0 commit comments