From: Steinar H. Gunderson Date: Sun, 23 Nov 2014 13:44:28 +0000 (+0100) Subject: Deal with strange PGN download failures. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=ea605b127d018d0b3e4927826e48f7dd69944aaa;ds=sidebyside Deal with strange PGN download failures. --- diff --git a/remoteglot.pl b/remoteglot.pl index 63cdac2..917a6a0 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -268,7 +268,7 @@ sub handle_pgn { } my $pgn = Chess::PGN::Parse->new(undef, $body); - if (!defined($pgn) || !$pgn->read_game()) { + if (!defined($pgn) || !$pgn->read_game() || $body !~ /^\[/) { warn "Error in parsing PGN from $url\n"; } else { eval {