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