[Reproducible-commits] [diffoscope] 03/09: Use open() everywhere instead of file()
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Sep 18 10:54:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit 3e829992f7b0259d421e7033bdc84ef289b9f03c
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Sep 18 11:43:31 2015 +0200
Use open() everywhere instead of file()
The file type has been removed in Python 3. See:
https://docs.python.org/3.5/whatsnew/3.0.html#builtins
---
diffoscope/comparators/binary.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index 3c8844a..6294620 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -162,7 +162,7 @@ class File(object):
my_size = os.path.getsize(self.path)
other_size = os.path.getsize(other.path)
if my_size == other_size and my_size <= SMALL_FILE_THRESHOLD:
- if file(self.path).read() == file(other.path).read():
+ if open(self.path).read() == open(other.path).read():
return True
return 0 == subprocess.call(['cmp', '--silent', self.path, other.path],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list