[Python-modules-commits] r13541 - in packages/pyxdg/trunk/debian (3 files)
pl-guest at users.alioth.debian.org
pl-guest at users.alioth.debian.org
Tue Jun 22 14:41:02 UTC 2010
Date: Tuesday, June 22, 2010 @ 14:40:52
Author: pl-guest
Revision: 13541
Replace string exceptions in Mime.py (fix-string-exceptions.patch) (closes: #585340).
Added:
packages/pyxdg/trunk/debian/patches/fix-string-exceptions.patch
Modified:
packages/pyxdg/trunk/debian/changelog
packages/pyxdg/trunk/debian/patches/series
Modified: packages/pyxdg/trunk/debian/changelog
===================================================================
--- packages/pyxdg/trunk/debian/changelog 2010-06-22 14:37:44 UTC (rev 13540)
+++ packages/pyxdg/trunk/debian/changelog 2010-06-22 14:40:52 UTC (rev 13541)
@@ -3,8 +3,9 @@
* Fix case when $XDG_*_HOME is empty (fix-BaseDirectory-cornercase.patch)
(closes: #568757). Kudos to Ãric Araujo!
* Fix xdg.Mime.install_mime_info() exception (fix-583497.patch) (closes: #583497).
+ * Replace string exceptions in Mime.py (fix-string-exceptions.patch) (closes: #585340).
- -- Piotr Lewandowski <piotr.lewandowski at gmail.com> Tue, 22 Jun 2010 14:35:41 +0000
+ -- Piotr Lewandowski <piotr.lewandowski at gmail.com> Tue, 22 Jun 2010 14:39:18 +0000
pyxdg (0.19-1) unstable; urgency=low
Added: packages/pyxdg/trunk/debian/patches/fix-string-exceptions.patch
===================================================================
--- packages/pyxdg/trunk/debian/patches/fix-string-exceptions.patch (rev 0)
+++ packages/pyxdg/trunk/debian/patches/fix-string-exceptions.patch 2010-06-22 14:40:52 UTC (rev 13541)
@@ -0,0 +1,34 @@
+Author: Piotr Lewandowski <piotr.lewandowski at gmail.com>
+Description: Do not raise strings as exceptions
+Bug-Debian: http://bugs.debian.org/585340
+Forwarded: yes
+
+--- a/xdg/Mime.py 2010-06-22 16:16:34.311503927 +0200
++++ b/xdg/Mime.py 2010-06-22 16:19:55.445061677 +0200
+@@ -153,7 +153,7 @@
+ self.range=1
+
+ if c!='\n':
+- raise 'Malformed MIME magic line'
++ raise ValueError('Malformed MIME magic line')
+
+ def getLength(self):
+ return self.start+self.lenvalue+self.range
+@@ -234,7 +234,7 @@
+ f=file(fname, 'r')
+ line=f.readline()
+ if line!='MIME-Magic\0\n':
+- raise 'Not a MIME magic file'
++ raise ValueError('Not a MIME magic file')
+
+ while True:
+ shead=f.readline()
+@@ -242,7 +242,7 @@
+ if not shead:
+ break
+ if shead[0]!='[' or shead[-2:]!=']\n':
+- raise 'Malformed section heading'
++ raise ValueError('Malformed section heading')
+ pri, tname=shead[1:-2].split(':')
+ #print shead[1:-2]
+ pri=int(pri)
Modified: packages/pyxdg/trunk/debian/patches/series
===================================================================
--- packages/pyxdg/trunk/debian/patches/series 2010-06-22 14:37:44 UTC (rev 13540)
+++ packages/pyxdg/trunk/debian/patches/series 2010-06-22 14:40:52 UTC (rev 13541)
@@ -3,3 +3,4 @@
add-IniFile-parse-docstring.patch
fix-BaseDirectory-empty-vars.patch
fix-583497.patch
+fix-string-exceptions.patch
More information about the Python-modules-commits
mailing list