Changeset 5057


Ignore:
Timestamp:
Feb 19, 2008, 4:48:43 PM (17 years ago)
Author:
ole
Message:

Simplified things

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/data_audit.py

    r5053 r5057  
    110110    all_files = 0
    111111    ok_files = 0
    112     files_found_in_dir = True
    113112    all_files_accounted_for = True
    114113    for dirpath, filename in identify_datafiles(directory,
     
    119118
    120119        if oldpath != dirpath:
    121             dir_change = True
     120            # Decide if dir header needs to be printed                       
    122121            oldpath = dirpath
    123             files_found_in_dir = False # Reset for this dir
    124         else:
    125             dir_change = False
     122            first_time_this_dir = True
     123           
     124
    126125
    127126        all_files += 1
     
    165164
    166165
    167         # Decide if dir header needs to be printed           
    168         if status != 'OK':
    169             files_found_in_dir = True
    170            
    171                    
    172         # Only print status if there is a problem (no news is good news)
    173         if dir_change is True and files_found_in_dir is True:
    174             print
    175             print '------------------------------------'
    176             msg = 'Files without licensing info in dir:'
    177             print msg, dirpath
    178             print '------------------------------------'
    179                
    180166
    181167        if status == 'OK':
    182168            ok_files += 1
    183169        else:
    184             #print dir_change, dirpath, filename + ' (Checksum=%s): '\
     170            # Only print status if there is a problem (no news is good news)
     171            if first_time_this_dir is True:
     172                print
     173                print '------------------------------------'
     174                msg = 'Files without licensing info in dir:'
     175                print msg, dirpath
     176                print '------------------------------------'
     177                first_time_this_dir = False
     178           
     179
    185180            print filename + ' (Checksum=%s): '\
    186181                  %str(compute_checksum(join(dirpath, filename))),\
Note: See TracChangeset for help on using the changeset viewer.