[livejournal] r18297: LJSUP-7934. Even more debug info.
Committer: gariev
LJSUP-7934. Even more debug info.U trunk/bin/misc/set_comm_supermaintainer.pl
Modified: trunk/bin/misc/set_comm_supermaintainer.pl
===================================================================
--- trunk/bin/misc/set_comm_supermaintainer.pl 2011-02-14 12:02:25 UTC (rev 18296)
+++ trunk/bin/misc/set_comm_supermaintainer.pl 2011-02-14 12:30:53 UTC (rev 18297)
@@ -10,7 +10,14 @@
require 'ljprotocol.pl';
use Getopt::Long;
use LJ::DBUtil;
+use Data::Dumper;
+use IO::Handle;
+STDOUT->autoflush(1);
+STDERR->autoflush(1);
+
+
+
my $help = <<"HELP";
This script set the supermaintainer role for all or selected communities.
If no supermaintainer can be set, then poll is created for the community.
@@ -259,7 +266,9 @@
my $u_id = $row->{'remoteid'};
my $u = LJ::load_userid ($u_id);
if (!$u) {
+ $u_id = "[undefined]" unless defined $u_id;
_log "\t\tCan't load maintainer ($u_id)\n";
+ _log Dumper($row);
} elsif (!$u->is_visible) {
_log "\t\tuser ($u->{user}) is not visible\n";
} elsif (!$u->can_manage($comm)) {
