create a backup of the file desired

def backup_file(filename):
    """ create a backup of the file desired """
    if not os.path.exists(filename):
        return

    BACKUP_SUFFIX = ".sprinter.bak"

    backup_filename = filename + BACKUP_SUFFIX
    shutil.copyfile(filename, backup_filename)