bugfix: check Isis database error in correct place
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Feb 2005 18:11:57 +0000 (18:11 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Feb 2005 18:11:57 +0000 (18:11 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@673 13eb9ef6-21d5-0310-b721-a9d68796d827

all2xml.pl

index 8f7e26c..1c5123b 100755 (executable)
@@ -742,13 +742,13 @@ print STDERR "using: $type...\n";
                $import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);
                my $db = new Biblio::Isis( isisdb => $isis_db );
 
-               my $max_rowid = $db->count if ($db);
-
-               if (! $max_rowid) {
+               if (! $db) {
                        print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n";
                        next;
                }
 
+               my $max_rowid = $db->count if ($db);
+
                print STDERR "Reading database: $isis_db [$max_rowid rows]\n";
 
                for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {