You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
os-autoinst/0001-Fix-return-value-of-_d...

37 lines
1.2 KiB

From 442f79e8b018ef4fed91c1256d5f4796cc42a36e Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 14 Apr 2021 21:43:27 -0700
Subject: [PATCH] Fix return value of _dbus_do_call
This was relying on perl's default return behaviour before
(return the result of the final line of the function, if it's an
expression). But now that's wrong, as the last line is something
else. We need to be explicit about what we're returning (which
would generally be a good thing to do anyway).
Related progress issue: https://progress.opensuse.org/issues/91163
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
backend/qemu.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/qemu.pm b/backend/qemu.pm
index 735e349c..04bb05fb 100644
--- a/backend/qemu.pm
+++ b/backend/qemu.pm
@@ -141,8 +141,9 @@ sub _dbus_do_call {
my $bus = Net::DBus->system(private => 1);
my $bus_service = $bus->get_service("org.opensuse.os_autoinst.switch");
my $bus_object = $bus_service->get_object("/switch", "org.opensuse.os_autoinst.switch");
- $bus_object->$fn(@args);
+ my @result = $bus_object->$fn(@args);
$bus->get_connection->disconnect;
+ return @result;
}
sub _dbus_call {
--
2.31.1