From 8f85219ff16dfd34cff8dc5ced4b17843ba4bfcf Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 26 Feb 2015 19:13:10 +0100 Subject: reproducible: scheduler: explicitly decode using utf8 + workaround for #647455 where deb822.iter_paragraphs() wants a list of string --- bin/reproducible_scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index ccc58974..168a5261 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -56,11 +56,11 @@ def update_sources_tables(suite): mirror = 'http://ftp.de.debian.org/debian' remotefile = mirror + '/dists/' + suite + '/main/source/Sources.gz' log.info('Downloading sources file for ' + suite + ': ' + remotefile) - sources = gzip.decompress(urlopen(remotefile).read()).decode() + sources = gzip.decompress(urlopen(remotefile).read()).decode('utf8') log.debug('\tdownloaded') # extract relevant info (package name and version) from the sources file new_pkgs = [] - for src in deb822.Sources.iter_paragraphs(sources): + for src in deb822.Sources.iter_paragraphs(sources.split('\n')): pkg = (src['Package'], src['Version'], suite) new_pkgs.append(pkg) # get the current packages in the database -- cgit v1.2.3-70-g09d2