nappy/utils/compare.py
def compDirs(d1, d2):
    """
    Compares directories by looping through and then calling
    compFiles() for each pair of files found.
    """
    dname = os.path.split(d1)[-1]
    # Ignore anything that is in exclusion list
    for excl in dir_exclusions:
        if excl.match(dname):
            print( "IGNORING EXCLUDED Directory:", d1)
            return

    items = os.listdir(d1)
    
    for item in items:

        d1f = os.path.join(d1, item)
        d2f = os.path.join(d2, item)
	
        if not os.path.exists(d2f):
            print( "WARNING: cannot find item:", d2f)
            continue

        if os.path.isdir(d1f):
            compDirs(d1f, d2f)
            continue

        compFiles(d1f, d2f)

    Compares directories by looping through and then calling
    compFiles() for each pair of files found.
    
Compares directories by looping through and then calling
compFiles() for each pair of files found.
Compares directories by looping through and then calling compFiles () for each pair of files found .
def compDirs(d1, d2):
    dname = os.path.split(d1)[-1]
    for excl in dir_exclusions:
        if excl.match(dname):
            print( "IGNORING EXCLUDED Directory:", d1)
            return
    items = os.listdir(d1)
    for item in items:
        d1f = os.path.join(d1, item)
        d2f = os.path.join(d2, item)
        if not os.path.exists(d2f):
            print( "WARNING: cannot find item:", d2f)
            continue
        if os.path.isdir(d1f):
            compDirs(d1f, d2f)
            continue
        compFiles(d1f, d2f)
def compDirs ( d1 , d2 ) : dname = os . path . split ( d1 ) [ - 1 ] for excl in dir_exclusions : if excl . match ( dname ) : print ( "IGNORING EXCLUDED Directory:" , d1 ) return items = os . listdir ( d1 ) for item in items : d1f = os . path . join ( d1 , item ) d2f = os . path . join ( d2 , item ) if not os . path . exists ( d2f ) : print ( "WARNING: cannot find item:" , d2f ) continue if os . path . isdir ( d1f ) : compDirs ( d1f , d2f ) continue compFiles ( d1f , d2f )
Compares directories by looping through and then calling
compFiles() for each pair of files found.
Compares directories by looping through and then calling compFiles () for each pair of files found .
"""
    Compares directories by looping through and then calling
    compFiles() for each pair of files found.
    """ # Ignore anything that is in exclusion list
d1
d2