[Pkg-python-debian-commits] r78 trunk: - bugfix: support spaces in filenames when accessing md5sums; thanks to

Stefano Zacchiroli zack at bononia.it
Mon Aug 20 17:33:31 UTC 2007


------------------------------------------------------------
revno: 78
committer: Stefano Zacchiroli <zack at bononia.it>
branch nick: pkg-python-debian
timestamp: Mon 2007-08-20 19:33:31 +0200
message:
    - bugfix: support spaces in filenames when accessing md5sums; thanks to
      Romain Francoise for the patch (closes: #438909)
modified:
  debian/changelog
  debian_bundle/debfile.py
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2007-08-20 10:48:08 +0000
+++ b/debian/changelog	2007-08-20 17:33:31 +0000
@@ -6,8 +6,10 @@
       returning a method
     - bugfix: use readlines() to iterate over the md5sums file since direct
       iteration on files is available only in python >= 2.5 (closes: #438804)
+    - bugfix: support spaces in filenames when accessing md5sums; thanks to
+      Romain Francoise for the patch (closes: #438909)
 
- -- Stefano Zacchiroli <zack at debian.org>  Mon, 20 Aug 2007 12:46:02 +0200
+ -- Stefano Zacchiroli <zack at debian.org>  Mon, 20 Aug 2007 19:31:08 +0200
 
 python-debian (0.1.5) unstable; urgency=low
 

=== modified file 'debian_bundle/debfile.py'
--- a/debian_bundle/debfile.py	2007-08-20 10:48:08 +0000
+++ b/debian_bundle/debfile.py	2007-08-20 17:33:31 +0000
@@ -167,7 +167,8 @@
         md5_file = self.get_file(MD5_FILE)
         sums = {}
         for line in md5_file.readlines():
-            md5, fname = line.split()
+            # we need to support spaces in filenames, .split() is not enough
+            md5, fname = line.rstrip('\n').split(None, 1)
             sums[fname] = md5
         md5_file.close()
         return sums



More information about the pkg-python-debian-commits mailing list