From d07a2172e7bea9236a4f4c624c97c2dcfd61e497 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Tue, 5 Jun 2012 22:46:19 +0200
Subject: [PATCH] one more xs-python-version case related fix

---
 debian/changelog     | 2 +-
 debian/pyversions.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 868f142..ffcf1b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,7 +23,7 @@ python-defaults (2.7.2-11) UNRELEASED; urgency=low
     - Add appropriage Breaks/Replaces
 
   [ Piotr Ożarowski ]
-  * dh_python2: make comparison of X(S)-Python-Version field names
+  * dh_python2, pyversions: make comparison of X(S)-Python-Version field names
     case-insensitive (Closes: #676224)
 
  -- Scott Kitterman <scott@kitterman.com>  Wed, 16 May 2012 14:58:09 -0400
diff --git a/debian/pyversions.py b/debian/pyversions.py
index 249a8e2..1aaaa01 100644
--- a/debian/pyversions.py
+++ b/debian/pyversions.py
@@ -261,12 +261,12 @@ def extract_pyversion_attribute(fn, pkg):
             section = 'Source'
         elif line.startswith('Package: ' + pkg):
             section = pkg
-        elif line.startswith('XS-Python-Version:') or line.startswith('X-Python-Version:'):
+        elif line.lower().startswith(('xs-python-version:', 'x-python-version:')):
             if section != 'Source':
                 raise ValueError, \
                       'attribute X(S)-Python-Version not in Source section'
             sversion = line.split(':', 1)[1].strip()
-        elif line.startswith('XB-Python-Version:'):
+        elif line.lower().startswith('xb-python-version:'):
             if section == pkg:
                 version = line.split(':', 1)[1].strip()
     if section == None:
-- 
GitLab