Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6664bb8

Browse files
committed
Sjoerd Mullender: cmp.py is obsolete...
1 parent eca4784 commit 6664bb8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Tools/freeze/bkfile.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ def close(self):
3535
self.__file.close()
3636
if self.__backup is None:
3737
return
38-
import cmp
39-
# don't use cmp.cmp because of NFS bugs :-( and
40-
# anyway, the stat mtime values differ so do_cmp will
41-
# most likely be called anyway
42-
if cmp.do_cmp(self.__backup, self.__filename):
38+
import filecmp
39+
if filecmp.cmp(self.__backup, self.__filename, shallow = 0):
4340
import os
4441
os.unlink(self.__filename)
4542
os.rename(self.__backup, self.__filename)

0 commit comments

Comments
 (0)