Permalink
Browse files

_Sources files will now break lines into paragraphs, breaking our par…

…ser.

We should really use python-debian for this.

Signed-off-by: Chris Lamb <lamby@debian.org>
  • Loading branch information...
lamby committed Aug 3, 2011
1 parent 117eccb commit 38fb8dc05b14ce9ba1c48bc1428afecfd7d8ef12
Showing with 8 additions and 6 deletions.
  1. +8 −6 AptFs/util.py
View
@@ -54,13 +54,15 @@ def package_info():
for line in stdout:
source_package = line.strip()
- binary_packages = stdout.next().strip().split(', ')
- stdout.next() # Blank line
+ binary_packages = set()
- try:
- binary_packages.remove(source_package)
- except ValueError:
- pass
+ while True:
+ line = stdout.next()
+ if line == '\n':
+ break
+ binary_packages.update(x for x in line.strip().split(', ') if x)
+
+ binary_packages.discard(source_package)
yield source_package, binary_packages

0 comments on commit 38fb8dc

Please sign in to comment.