Changeset 32826 for main

Show
Ignore:
Timestamp:
27.02.2019 18:55:36 (9 months ago)
Author:
ak19
Message:

GLI build log display removes lines starting with unrecognised elements/tags, but when we wget a webpage when activating/deactivating and print out that webpage's contents for debugging, we'd like to see the lines starting with tags too since they can be the most useful. Don't want to make GLI behave differently, so servercontrol changes such tags to be embedded in [] instead of <> so that GLI still dispklays the informative lines

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/servercontrol.pm

    r32498 r32826  
    207207        my $resultstr; 
    208208        # Read in the entire contents of the file in one hit 
    209         sysread(FIN, $resultstr, -s FIN);        
     209        ##sysread(FIN, $resultstr, -s FIN); 
     210        # GLI GBuildProgressMonitor.hasSignalledStop() removes any lines that start with elements it doesn't recognise 
     211        # but we want to see the lines with HTML tags as they are the most interesting: they embed success/failure messages 
     212        # So read line by line from the downloaded web page and replace <> with [] so that GLI can display these lines too 
     213        while (my $line = <FIN>) { 
     214            chomp $line; 
     215            $line =~ s@<@[@g; 
     216            $line =~ s@>@]@g; 
     217            $resultstr .= "$line\n"; 
     218        } 
    210219        close(FIN); 
    211220        &FileUtils::removeFiles($tmpfilename); # get rid of the ping response's temporary html file we downloaded