summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-04-30 16:56:03 -0700
committerThomas A Caswell <tcaswell@gmail.com>2015-09-29 14:43:14 -0400
commita75e72763a52757daea4c1f917dc2922029a3af5 (patch)
tree207c828e7b277b6de3d19b6182a54493a832aa26
parent415895066f3395a4c6b6e7ab1cfe6674d962d469 (diff)
downloadgobject-introspection-a75e72763a52757daea4c1f917dc2922029a3af5.tar.gz
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
-rw-r--r--giscanner/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py
index 660081ed..e9ae0b6a 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 != '':