[extensions-web] Return None if the files are the same
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Return None if the files are the same
- Date: Tue, 15 Nov 2011 18:51:39 +0000 (UTC)
commit 08daf6d137f6c53a72f9ef1760352f3136ff2946
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 15 13:49:17 2011 -0500
Return None if the files are the same
sweettooth/review/views.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index f3420c8..df4d793 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -93,6 +93,10 @@ def get_zipfiles(version):
def get_diff(old_zipfile, new_zipfile, filename, highlight):
old, new = old_zipfile.open(filename, 'r'), new_zipfile.open(filename, 'r')
oldcontent, newcontent = old.read(), new.read()
+
+ if oldcontent == newcontent:
+ return None
+
old.close()
new.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]