[gobject-introspection] giscanner: Use binary files for comparison utility
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: Use binary files for comparison utility
- Date: Wed, 30 Sep 2015 03:08:32 +0000 (UTC)
commit a75e72763a52757daea4c1f917dc2922029a3af5
Author: Simon Feltman <sfeltman src gnome org>
Date: Wed Apr 30 16:56:03 2014 -0700
giscanner: Use binary files for comparison utility
Explicitly open files for comparison in utils.files_are_identical()
in binary mode for reading (rb).
https://bugzilla.gnome.org/show_bug.cgi?id=679438
giscanner/utils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/utils.py b/giscanner/utils.py
index 660081e..e9ae0b6 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -164,7 +164,7 @@ def get_libtool_command(options):
def files_are_identical(path1, path2):
- with open(path1) as f1, open(path2) as f2:
+ with open(path1, 'rb') as f1, open(path2, 'rb') as f2:
buf1 = f1.read(8192)
buf2 = f2.read(8192)
while buf1 == buf2 and buf1 != '':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]