Handle errors if the dbh is unavailable.

        Patch by kareila. 

diffs (12 lines):

diff -r c8b7141976ac -r b18efce4d443 bin/renameuser.pl
--- a/bin/renameuser.pl Wed Sep 30 04:48:18 2009 +0000
+++ b/bin/renameuser.pl Wed Sep 30 04:50:01 2009 +0000
@@ -22,7 +22,7 @@ my $to = shift @ARGV;
 my $to = shift @ARGV;
 usage() unless $from =~ /^\w{1,25}$/ && $to =~ /^\w{1,25}$/;
 
-my $dbh = LJ::get_db_writer();
+my $dbh = LJ::get_db_writer() or die "Could not get DB handle";
 
 unless ($args{swap}) {
     if (rename_user($from, $to)) {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to