[Python-checkins] hooks: Strengthen a bit

local-hg python-checkins at python.org
Mon Apr 16 18:02:30 CEST 2012


http://hg.python.org/hooks/rev/7bfbd6ebe503
changeset:   80:7bfbd6ebe503
user:        hg repo admin <python-dev at python.org>
date:        Mon Apr 16 18:02:30 2012 +0200
summary:
  Strengthen a bit

files:
  mail.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/mail.py b/mail.py
--- a/mail.py
+++ b/mail.py
@@ -35,7 +35,8 @@
     for chunk in chunks:
         lines = chunk.splitlines(True)
         try:
-            i = lines.index('GIT binary patch\n')
+            # This is the second or third line usually
+            i = lines.index('GIT binary patch\n', 0, 4)
         except ValueError:
             pass
         else:

-- 
Repository URL: http://hg.python.org/hooks


More information about the Python-checkins mailing list