(src, dst)
return True
Copy config file or symlink.
    Does _not_ overwrite target.
Copy config file or symlink.
    Does _not_ overwrite target.
Copy config file or symlink . Does _not_ overwrite target .
def copy_conf(src, dst):
    """Copy config file or symlink.
    Does _not_ overwrite target.
    """
    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))
    if os.path.exists(dst):
        return False
    if os.path.islink(src):
        linkdst = os.readlink(src)
        os.symlink(linkdst, dst)
    elif os.path.isfile(src):
        shutil.copy2(src, dst)
    else:
        raise Exception("Unsupported file type: %s" % src)
    return True
def copy_conf ( src , dst ) : if os . path . isdir ( dst ) : dst = os . path . join ( dst , os . path . basename ( src ) ) if os . path . exists ( dst ) : return False if os . path . islink ( src ) : linkdst = os . readlink ( src ) os . symlink ( linkdst , dst ) elif os . path . isfile ( src ) : shutil . copy2 ( src , dst ) else : raise Exception ( "Unsupported file type: %s" % src ) return True