(filename)
return full_fn
Find SQL script from pre-defined paths.
Find SQL script from pre-defined paths.
Find SQL script from pre - defined paths .
def installer_find_file(filename):
    """Find SQL script from pre-defined paths."""
    full_fn = None
    if filename[0] == "/":
        if os.path.isfile(filename):
            full_fn = filename
    else:
        import skytools.installer_config
        dir_list = skytools.installer_config.sql_locations
        for fdir in dir_list:
            fn = os.path.join(fdir, filename)
            if os.path.isfile(fn):
                full_fn = fn
                break

    if not full_fn:
        raise Exception('File not found: '+filename)
    return full_fn
def installer_find_file ( filename ) : full_fn = None if filename [ 0 ] == "/" : if os . path . isfile ( filename ) : full_fn = filename else : import skytools . installer_config dir_list = skytools . installer_config . sql_locations for fdir in dir_list : fn = os . path . join ( fdir , filename ) if os . path . isfile ( fn ) : full_fn = fn break if not full_fn : raise Exception ( 'File not found: ' + filename ) return full_fn