[libnet-dbus-perl] 98/335: Don't discard the introspect error, if it was a 'no such service' error
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:07:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.
commit eaee19bbee121ec6f7ab53d220a2a0ae9b1fcf1e
Author: Daniel P. Berrange <dan at berrange.com>
Date: Fri Sep 9 14:06:10 2005 +0000
Don't discard the introspect error, if it was a 'no such service' error
---
lib/Net/DBus/RemoteObject.pm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/lib/Net/DBus/RemoteObject.pm b/lib/Net/DBus/RemoteObject.pm
index a27e8b4..f3af993 100644
--- a/lib/Net/DBus/RemoteObject.pm
+++ b/lib/Net/DBus/RemoteObject.pm
@@ -66,10 +66,19 @@ sub _introspector {
my $iter = $reply->iterator;
return $iter->get(&Net::DBus::Binding::Message::TYPE_STRING);
};
- # Ignore failures
- #if ($@) {
- # warn "could not introspect object: $@";
- #}
+ if ($@) {
+ if (UNIVERSAL::isa($@, "Net::DBus::Error") &&
+ $@->{name} eq "org.freedesktop.DBus.Error.ServiceUnknown") {
+ die $@;
+ } else {
+ # Ignore other failures, since its probably
+ # just that the object doesn't implement
+ # the introspect method. Of course without
+ # the introspect method we can't tell for sure
+ # if this is the case..
+ #warn "could not introspect object: $@";
+ }
+ }
if ($xml) {
$self->{introspector} = Net::DBus::Binding::Introspector->new(xml => $xml,
object_path => $self->{object_path});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list