X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=apt_p2p%2FAptPackages.py;h=ac966a9075356bfee0eed92393aed82cd1c2f4b3;hp=1238c65c46338066867e97e422bc985c8f8c6b37;hb=96ea4dd2eaf55c5e94f1a9f13ec36fac10387158;hpb=cc3a274e61597555c4de4cf9190a99cf08d9ab0d diff --git a/apt_p2p/AptPackages.py b/apt_p2p/AptPackages.py index 1238c65..ac966a9 100644 --- a/apt_p2p/AptPackages.py +++ b/apt_p2p/AptPackages.py @@ -38,7 +38,7 @@ from twisted.trial import unittest import apt_pkg, apt_inst from apt import OpProgress -from debian_bundle import deb822 +from debian import deb822 from apt_p2p_conf import config from Hash import HashObject @@ -228,7 +228,7 @@ class AptPackages: rel = deb822.Release(f, fields = ['MD5Sum', 'SHA1', 'SHA256']) for hash_type in rel: for file in rel[hash_type]: - self.indexrecords[cache_path].setdefault(file['name'], {})[hash_type.upper()] = (file[hash_type], file['size']) + self.indexrecords[cache_path].setdefault(str(file['name']), {})[hash_type.upper()] = (str(file[hash_type]), file['size']) f.close()