Don't fail if $g->set_program method is not supported.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Oct 2016 10:10:21 +0000 (11:10 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Oct 2016 10:10:21 +0000 (11:10 +0100)
For RHEL 6.

import-to-ovirt.pl

index 112e6d6..abb557b 100755 (executable)
@@ -242,7 +242,7 @@ unlink ".test.qcow2";
 
 # Open the guest in libguestfs so we can inspect it.
 my $g = Sys::Guestfs->new ();
-$g->set_program ("virt-import-to-ovirt");
+eval { $g->set_program ("virt-import-to-ovirt"); };
 $g->add_drive_opts ($_, readonly => 1) foreach (@disks);
 $g->launch ();
 my @roots = $g->inspect_os ();