]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Merge branch 'documentation' into apt-dht
authorCameron Dale <camrdale@gmail.com>
Wed, 5 Mar 2008 23:06:44 +0000 (15:06 -0800)
committerCameron Dale <camrdale@gmail.com>
Wed, 5 Mar 2008 23:06:44 +0000 (15:06 -0800)
1  2 
apt_dht/AptPackages.py
apt_dht/MirrorManager.py
apt_dht/db.py

index 1cd517a9d378b03abb702a90351cf940c64bbcb2,45c035f12833ce707f933d34c2c2978421e9e8f9..c784b8b68bf7386139caccd8f814a2318ba2c13a
@@@ -162,9 -209,12 +209,11 @@@ class AptPackages
          
      def __del__(self):
          self.cleanup()
 -        self.packages.close()
          
      def addRelease(self, cache_path, file_path):
-         """Dirty hack until python-apt supports apt-pkg/indexrecords.h
+         """Add a Release file's info to the list of index files.
+         
+         Dirty hack until python-apt supports apt-pkg/indexrecords.h
          (see Bug #456141)
          """
          self.indexrecords[cache_path] = {}
Simple merge
diff --cc apt_dht/db.py
index cdd86c5e2fa89b033c2a3ededa45d02e71a1dfc2,f72b104d8c5965950ad744a432af86d3431e103d..fd265f6f36503ca31cf9d8a0dda11b8c78bc9f89
@@@ -87,8 -126,9 +126,9 @@@ class DB
              new_hash = False
              hashID = row['hashID']
          else:
+             # Add the new hash to the database
              c = self.conn.cursor()
 -            c.execute("INSERT OR REPLACE INTO hashes (hash, pieces, piecehash, refreshed) VALUES (?, ?, ?)",
 +            c.execute("INSERT OR REPLACE INTO hashes (hash, pieces, piecehash, refreshed) VALUES (?, ?, ?, ?)",
                        (khash(hash), khash(pieces), khash(piecehash), datetime.now()))
              self.conn.commit()
              new_hash = True