X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-top%2Fvirt_top_main.ml;h=ba98e7e5e2533da1d05ee125996aad3fb7b684ce;hb=d81bd95b04381b8e3c49eea7c0f98b5cb72be863;hp=cb3486ee5152729629335ccf14a0161ee4632807;hpb=757832f0f789d30abcad040216bd8a69e25842d5;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 cb3486e..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; - if !script_mode then 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