GlibGerror can be raised by virt-sandbox-service, this patch will catch
the exception and write the error to stderr.

Signed-off-by: Dan Walsh <dwa...@redhat.com>
---
 bin/virt-sandbox-service | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index df88284..f4df262 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -1084,3 +1084,7 @@ if __name__ == '__main__':
         sys.stderr.write("%s: %s\n" % (sys.argv[0], e))
         sys.stderr.flush()
         sys.exit(1)
+    except GLib.GError, e:
+        sys.stderr.write("%s: %s\n" % (sys.argv[0], e))
+        sys.stderr.flush()
+        sys.exit(1)
-- 
1.8.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to