summaryrefslogtreecommitdiffstats
path: root/virt-top/virt_top_main.ml
diff options
context:
space:
mode:
Diffstat (limited to 'virt-top/virt_top_main.ml')
-rw-r--r--virt-top/virt_top_main.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/virt-top/virt_top_main.ml b/virt-top/virt_top_main.ml
index cb3486e..ba98e7e 100644
--- 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