From 33a0437c96c9f55affe67ca7f6ef32ad9224d49a Mon Sep 17 00:00:00 2001 From: dondelelcaro Date: Mon, 15 Sep 2008 18:59:11 +0000 Subject: [PATCH] * add some more debugging code to the do_id code git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1846 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Modules/DebianExtra.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Modules/DebianExtra.pl b/src/Modules/DebianExtra.pl index abc7259..e9e7d43 100644 --- a/src/Modules/DebianExtra.pl +++ b/src/Modules/DebianExtra.pl @@ -89,7 +89,14 @@ sub do_id($) { my $soap = SOAP::Lite->uri('Debbugs/SOAP/1')-> proxy('http://bugs.debian.org/cgi-bin/soap.cgi'); $soap->transport->env_proxy(); - my $result = $soap->get_status(bug => $bug_num)->result(); + my $temp = $soap->get_status(bug => $bug_num); + use Data::Dumper; + &::DEBUG(Dumper($temp)); + if ($temp->fault) { + return "Some failure (".$temp->fault->{faultstring}.")"; + } + my $result = $temp->result(); + &::DEBUG(Dumper($result)); if (not defined $result) { return "No such bug (or some kind of error)"; } @@ -103,7 +110,7 @@ sub do_id($) { $bug->{reporter} = $result->{submitter}; $bug->{date} = $result->{date}; $bug->{tags} = $result->{keywords}; - $bug->{done} = defined $result->{done} and length $result->{done}; + $bug->{done} = defined $result->{done} && length($result->{done}) > 0; $bug->{merged_with} = $result->{mergedwith}; # report bug -- 2.39.5