]> git.donarmstrong.com Git - bugscan.git/commitdiff
readstatus supports empty status files
authorDon Armstrong <don@donarmstrong.com>
Wed, 19 Mar 2014 00:35:25 +0000 (17:35 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 19 Mar 2014 00:35:25 +0000 (17:35 -0700)
scanlib.pm

index 6ed7cce85390860ab9661beaa7d67e79dad155ad..a728bd0c2a9c4b6f5a9b0d9855f61f74dc7c1aa2 100644 (file)
@@ -258,7 +258,9 @@ sub readstatus {
                or die "$filename: $!";
 
     while (1) {
-               chomp (my $type = <STATUS>);
+               my $type = <STATUS>;
+        last if not defined $type;
+        chomp $type;
                if ($type eq 'package') {
                        chomp (my $package = <STATUS>);
                        chomp (my $section = <STATUS>);