From 8b2dd1fef5d4b5496ebf8b912cc66f364b4ae5c4 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 31 Mar 2020 11:18:18 +0000 Subject: [PATCH] Fixed a Py2/3 issue in the djangobwr's bower_install command - Legacy-Id: 17568 --- djangobwr/management/commands/bower_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangobwr/management/commands/bower_install.py b/djangobwr/management/commands/bower_install.py index de6e5b0c0..a77e3dae7 100644 --- a/djangobwr/management/commands/bower_install.py +++ b/djangobwr/management/commands/bower_install.py @@ -158,9 +158,9 @@ class Command(BaseCommand): # Check if we need to copy the file at all. if os.path.exists(dst_path): - with open(src_path) as src: + with open(src_path, 'br') as src: src_hash = hashlib.sha1(src.read()).hexdigest() - with open(dst_path) as dst: + with open(dst_path, 'br') as dst: dst_hash = hashlib.sha1(dst.read()).hexdigest() if src_hash == dst_hash: #print('{0} = {1}'.format(src_path, dst_path))