From: Richard W.M. Jones Date: Mon, 17 Oct 2016 10:10:21 +0000 (+0100) Subject: Don't fail if $g->set_program method is not supported. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=09dfd172c7933d6ce5ae27e7c1baeef502e5fd0f;p=import-to-ovirt.git Don't fail if $g->set_program method is not supported. For RHEL 6. --- diff --git a/import-to-ovirt.pl b/import-to-ovirt.pl index 112e6d6..abb557b 100755 --- a/import-to-ovirt.pl +++ b/import-to-ovirt.pl @@ -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 ();