validate_mac_table_files.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:cluster-genesis 作者: open-power-ref-design-toolkit 项目源码 文件源码
def compare_files(file1, file2, log):
    """Compare two files

    Use Python's filecmp module to compare two files and log/print
    results.

    Args:
        file1 (string): Path of first file to compare
        file2 (string): Path of second file to compare
        log (:obj:`Logger`): Log file object.

    Returns:
        boolean: True if they seem equal, False otherwise
    """
    if filecmp.cmp(file1, file2):
        msg = ("Two MAC Address Table Files Are Identical! '%s' & '%s'"
               % (file1, file2))
        log.error(msg)
        print("Error: " + msg)
        return True
    else:
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号