status-report-scripts parseBZbugList,1.79,1.80

Christian Iseli (c4chris) fedora-extras-commits at redhat.com
Thu Jul 26 05:51:06 UTC 2007


Author: c4chris

Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24534

Modified Files:
	parseBZbugList 
Log Message:
Loop until we get the answers we want.


Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- parseBZbugList	11 Jul 2007 14:58:00 -0000	1.79
+++ parseBZbugList	26 Jul 2007 05:51:04 -0000	1.80
@@ -32,7 +32,7 @@
   proxy => 'https://bugzilla.redhat.com/bugzilla/xmlrpc.cgi'
 );
 # Not sure of the way to increase the timeout on reading...
-#$rpc->transport->timeout(360);
+$rpc->transport->timeout(360);
 
 my %opt;
 my @options = ( "help", "repourl=s", "o=s", "d=s", "cvs=s",
@@ -1334,22 +1334,41 @@
     $querydata->{'type0-0-0'} = 'equals';
     $querydata->{'value0-0-0'} = "fedora-review$flag";
   }
-  print STDERR "Running runQuery(rpc, '$flag') all open\n";
-  my $call = $rpc->call('bugzilla.runQuery', $querydata,
-			$main::BZusername, $main::password);
-  if ($call->faultstring) {
-    print STDERR $call->faultstring . "\n";
-    exit 1;
+  my $call;
+  while (1) {
+    print STDERR "Running runQuery(rpc, '$flag') all open\n";
+    eval {
+      $call = $rpc->call('bugzilla.runQuery', $querydata,
+			 $main::BZusername, $main::password);
+      if ($call->faultstring) {
+	print STDERR $call->faultstring . "\n";
+	exit 1;
+      }
+    };
+    if ($@) {
+      warn $@;
+    } else {
+      last;
+    }
   }
   my $result = $call->result;
   my $res_all = $result->{'bugs'};
   $querydata->{'bug_status'} = ["CLOSED"];
-  print STDERR "Running runQuery(rpc, '$flag') closed\n";
-  $call = $rpc->call('bugzilla.runQuery', $querydata,
-		     $main::BZusername, $main::password);
-  if ($call->faultstring) {
-    print STDERR $call->faultstring . "\n";
-    exit 1;
+  while (1) {
+    print STDERR "Running runQuery(rpc, '$flag') closed\n";
+    eval {
+      $call = $rpc->call('bugzilla.runQuery', $querydata,
+	  		  $main::BZusername, $main::password);
+      if ($call->faultstring) {
+	print STDERR $call->faultstring . "\n";
+	exit 1;
+      }
+    };
+    if ($@) {
+      warn $@;
+    } else {
+      last;
+    }
   }
   $result = $call->result;
   my $res2 = $result->{'bugs'};
@@ -1367,12 +1386,22 @@
     'component'   => $pkg,
     'bug_status'  => ["NEW", "VERIFIED", "ASSIGNED", "REOPENED", "MODIFIED"]
   };
-  my $call = $rpc->call('bugzilla.runQuery', $querydata,
-			$main::BZusername, $main::password);
-  if ($call->faultstring) {
-    print STDERR "Running runQueryOpenBugs(rpc, pkg_array)\n";
-    print STDERR $call->faultstring . "\n";
-    exit 1;
+  my $call;
+  while (1) {
+    eval {
+      $call = $rpc->call('bugzilla.runQuery', $querydata,
+  			 $main::BZusername, $main::password);
+      if ($call->faultstring) {
+	print STDERR $call->faultstring . "\n";
+	exit 1;
+      }
+    };
+    if ($@) {
+      warn $@;
+      print STDERR "Re-running runQueryOpenBugs(rpc, pkg_array)\n";
+    } else {
+      last;
+    }
   }
   my $result = $call->result;
   return $result->{'bugs'};




More information about the fedora-extras-commits mailing list