]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p/AptPackages.py
Use python-debian's new debian package instead of debian_bundle
[quix0rs-apt-p2p.git] / apt_p2p / AptPackages.py
index 1238c65c46338066867e97e422bc985c8f8c6b37..ac966a9075356bfee0eed92393aed82cd1c2f4b3 100644 (file)
@@ -38,7 +38,7 @@ from twisted.trial import unittest
 
 import apt_pkg, apt_inst
 from apt import OpProgress
 
 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
 
 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]:
         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()
 
             
         f.close()