[Debian-l10n-commits] [ddtp] branch master updated (de368bc -> 79d928e)

Martijn van Oosterhout kleptog-guest at moszumanska.debian.org
Sat Mar 29 07:19:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

kleptog-guest pushed a change to branch master
in repository ddtp.

      from  de368bc   Fix stats display to read gz files instead of bz2.
       new  b7398e6   Change if package was actually found, to reducing spamming in logs.
       new  1db2ff1   Log error messages and release DB connection correctly.
       new  79d928e   Remove invalid path reference.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ddt.cgi             | 5 +++++
 ddtss/DDTSS_Pg.pm   | 8 +++++---
 ddtss/ddtss-process | 2 --
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ddt.cgi b/ddt.cgi
index b7e09e9..091834a 100755
--- a/ddt.cgi
+++ b/ddt.cgi
@@ -279,6 +279,11 @@ if (param('desc_id') and not param('language') and not param('getuntrans') and n
 	$sth->execute($description_id);
 
 	($description,$prioritize,$package,$source) = $sth->fetchrow_array ;
+	if(!defined $description) {
+	        print header(-status => 404);
+	        print "Package not found\n";
+	        exit(0);
+        }
 
 	print "Content-type: text/html; charset=UTF-8\n";	
 	print "\n";	
diff --git a/ddtss/DDTSS_Pg.pm b/ddtss/DDTSS_Pg.pm
index 4b71f6b..a326c25 100644
--- a/ddtss/DDTSS_Pg.pm
+++ b/ddtss/DDTSS_Pg.pm
@@ -680,15 +680,17 @@ sub submit_one_package
   # Substitute translated description in, for logs
   unless( $data =~ s/^Description-[\w.-]+:(( .*)?\n)+#/Description-$lang.UTF-8: $short\n$long\n#/m )
   {
-    -t STDERR and print STDERR "Substitution failed for $package, not sending ($data)\n";
-    next;
+    print STDERR "Substitution failed for $package (lang $lang), not sending ($data)\n";
+    DDTSS_Close($db);
+    return;
   }
 
   # Extract description for submitting to db
   my $description = $data;
   unless( $description =~ s/.*^Description: ((.*?)\n.*)^Description-.*/$1/ms )
   {
-    -t STDERR and print STDERR "Substitution failed for $package, not sending ($description)\n";
+    print STDERR "Substitution failed for $package (lang $lang), not sending ($description)\n";
+    DDTSS_Close($db);
     return;
   }
   my $newshort = $2;
diff --git a/ddtss/ddtss-process b/ddtss/ddtss-process
index 545e053..ba5788f 100755
--- a/ddtss/ddtss-process
+++ b/ddtss/ddtss-process
@@ -13,8 +13,6 @@ use strict;
 BEGIN { 
   exit if( scalar grep { $_ > 10 } split / *, */, qx(uptime |sed "s/.*average: //") );
 }
-# This is the installation directory
-use lib '/home/kleptog/perl/ddtss2';
 use DDTSS_Pg;
 
 process_todo();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-l10n/ddtp.git



More information about the Debian-l10n-commits mailing list