X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-top%2Fvirt_top_main.ml;h=ba98e7e5e2533da1d05ee125996aad3fb7b684ce;hb=b2a619b32d66d94779b7fef0363aecfa17cef6f7;hp=edf87de3b540a868b08a7fbd4bd85e31820f2e63;hpb=9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43;p=virt-top.git diff --git a/virt-top/virt_top_main.ml b/virt-top/virt_top_main.ml old mode 100644 new mode 100755 index edf87de..ba98e7e --- a/virt-top/virt_top_main.ml +++ b/virt-top/virt_top_main.ml @@ -30,19 +30,19 @@ open Virt_top * the program under --debug ...). *) let error = - let setup = start_up () in + let ((_, _, script_mode, _, _, _, _) as setup) = start_up () in try main_loop setup; - endwin (); + if not script_mode then endwin (); false with | Libvirt.Virterror err -> - endwin (); + if not script_mode then endwin (); prerr_endline (Libvirt.Virterror.to_string err); true | exn -> - endwin (); + if not script_mode then endwin (); prerr_endline ("Error: " ^ Printexc.to_string exn); true