]> granicus.if.org Git - python/commitdiff
Sjoerd Mullender: cmp.py is obsolete...
authorGuido van Rossum <guido@python.org>
Fri, 28 Apr 2000 13:31:52 +0000 (13:31 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 28 Apr 2000 13:31:52 +0000 (13:31 +0000)
Tools/freeze/bkfile.py

index 6d0ccdeac7803835908ade7278cfa2428c66d22c..d29716a93c98b3db6eef4c3720ff59738621eb34 100644 (file)
@@ -35,11 +35,8 @@ class _BkFile:
                self.__file.close()
                if self.__backup is None:
                        return
-               import cmp
-               # don't use cmp.cmp because of NFS bugs :-( and
-               # anyway, the stat mtime values differ so do_cmp will
-               # most likely be called anyway
-               if cmp.do_cmp(self.__backup, self.__filename):
+               import filecmp
+               if filecmp.cmp(self.__backup, self.__filename, shallow = 0):
                        import os
                        os.unlink(self.__filename)
                        os.rename(self.__backup, self.__filename)