]> git.donarmstrong.com Git - infobot.git/commitdiff
* add some more debugging code to the do_id code
authordondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 15 Sep 2008 18:59:11 +0000 (18:59 +0000)
committerdondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 15 Sep 2008 18:59:11 +0000 (18:59 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1846 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/DebianExtra.pl

index abc7259cbfa97fcc4157c4dd19229b6082913d3a..e9e7d43589dc92044cc53f19ba22fb0aacb06b74 100644 (file)
@@ -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