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

@@@ -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
@@@ -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