[dw-free] bin/renameuser.pl busted
[commit: http://hg.dwscoalition.org/dw-free/rev/b18efce4d443]
http://bugs.dwscoalition.org/show_bug.cgi?id=1816
Handle errors if the dbh is unavailable.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1816
Handle errors if the dbh is unavailable.
Patch by
Files modified:
- bin/renameuser.pl
--------------------------------------------------------------------------------
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)) {
--------------------------------------------------------------------------------
