Show
Ignore:
Timestamp:
02/18/10 12:35:35 (2 years ago)
Author:
pracine
Message:

[wktraster] Ticket 349. Do not print summary when the output is not directed to a file using the -o option.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • spike/wktraster/scripts/gdal2wktraster.py

    r5102 r5259  
    10101010 
    10111011    # Cleanup 
    1012     sys.stdout = saved_out 
    1013  
    1014     print "------------------------------------------------------------" 
    1015     print " Summary of GDAL to WKT Raster processing:" 
    1016     print "------------------------------------------------------------" 
    1017     if i == 1: 
    1018         m = '%d (%s)' % (i, infile) 
    1019     else: 
    1020         m = '%d' % i 
    1021     print "Number of processed raster files: " + m 
    1022     print "List of generated tables (number of tiles):" 
    1023     i = 0 
    1024     for s in SUMMARY: 
    1025         i += 1 
    1026         print "%d\t%s (%d)" % (i, s[0], s[1]) 
     1012    if opts.output != sys.stdout: 
     1013        sys.stdout = saved_out 
     1014 
     1015        print "------------------------------------------------------------" 
     1016        print " Summary of GDAL to WKT Raster processing:" 
     1017        print "------------------------------------------------------------" 
     1018        if i == 1: 
     1019            m = '%d (%s)' % (i, infile) 
     1020        else: 
     1021            m = '%d' % i 
     1022        print "Number of processed raster files: " + m 
     1023        print "List of generated tables (number of tiles):" 
     1024        i = 0 
     1025        for s in SUMMARY: 
     1026            i += 1 
     1027            print "%d\t%s (%d)" % (i, s[0], s[1]) 
    10271028 
    10281029################################################################################