Author: neronus-guest
Date: 2008-07-24 12:28:46 +0000 (Thu, 24 Jul 2008)
New Revision: 925

Added:
   udd/src/udd/__init__.py
Modified:
   udd/src/udd/bugs_gatherer.pl
   udd/src/udd/sources_gatherer.py
Log:
* added module init file
* moved statement deallocation in sources_gatherer.py
* the pending status of bugs is read now, too


Added: udd/src/udd/__init__.py
===================================================================

Modified: udd/src/udd/bugs_gatherer.pl
===================================================================
--- udd/src/udd/bugs_gatherer.pl        2008-07-23 21:15:15 UTC (rev 924)
+++ udd/src/udd/bugs_gatherer.pl        2008-07-24 12:28:46 UTC (rev 925)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# Last-Modified: <Wed Jul 23 14:26:55 2008>
+# Last-Modified: <Wed Jul 23 14:44:51 2008>
 
 use strict;
 use warnings;
@@ -38,11 +38,11 @@
 
        # Read all bugs
        foreach my $bug_nr (get_bugs()) {
-               my %bug = %{readbug($bug_nr)};
+               my %bug = %{get_bug_status($bug_nr)};
                # Construct insertion query
                my $date = strftime("%Y-%m-%d %T", localtime($bug{date}));
                my $log_modified = strftime("%Y-%m-%d %T", 
localtime($bug{log_modified}));
-               map { $bug{$_} = $dbh->quote($bug{$_}) } qw(subject originator 
owner);
+               map { $bug{$_} = $dbh->quote($bug{$_}) } qw(subject originator 
owner pending);
                my @found_versions = map { $dbh->quote($_) } 
@{$bug{found_versions}};
                my @fixed_versions = map { $dbh->quote($_) } 
@{$bug{fixed_versions}};
 
@@ -75,9 +75,11 @@
                        $present_in_unstable = 'TRUE';
                }
 
+               #my $bug_status = get_bug_status(bug => $bug_nr, status => 
\%bug);
+
                # Insert data into bugs table
                my $query = "INSERT INTO bugs VALUES ($bug_nr, '$bug{package}', 
'$date', \
-                            NULL, '$bug{severity}', '$bug{keywords}', 
$bug{originator}, $bug{owner}, \
+                            $bug{pending}, '$bug{severity}', '$bug{keywords}', 
$bug{originator}, $bug{owner}, \
                                         $bug{subject}, '$log_modified', 
$present_in_stable,
                                         $present_in_testing, 
$present_in_unstable)";
                # Execute insertion

Modified: udd/src/udd/sources_gatherer.py
===================================================================
--- udd/src/udd/sources_gatherer.py     2008-07-23 21:15:15 UTC (rev 924)
+++ udd/src/udd/sources_gatherer.py     2008-07-24 12:28:46 UTC (rev 925)
@@ -1,5 +1,5 @@
 #/usr/bin/env python
-# Last-Modified: <Sun Jun 29 12:12:27 2008>
+# Last-Modified: <Thu Jul 24 12:26:00 2008>
 
 import debian_bundle.deb822
 import gzip
@@ -125,9 +125,9 @@
        aux.print_debug("Importing from " + path)
        self.import_sources(open(tmp.name))
        tmp.close()
-       cur.execute("DEALLOCATE source_insert")
       except IOError, (e, message):
        print "Could not read packages from %s: %s" % (path, message)
+      cur.execute("DEALLOCATE source_insert")
 
     self.print_warnings()
 


_______________________________________________
Collab-qa-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/collab-qa-commits

Reply via email to