Fix up the application to work with then new structure.
authorCameron Dale <camrdale@gmail.com>
Sun, 16 Dec 2007 04:02:15 +0000 (20:02 -0800)
committerCameron Dale <camrdale@gmail.com>
Sun, 16 Dec 2007 04:02:15 +0000 (20:02 -0800)
.gitignore
apt-dht.py
apt_dht/HTTPServer.py
apt_dht/__init__.py [new file with mode: 0644]
apt_dht/apt_dht.py

index dae79deea73eb98d2b095d0fb76011ff401ef2a1..2c4f8e90a3a2e24ae6b694065bd34d56bb98e65b 100644 (file)
@@ -1,3 +1,4 @@
 .project
 .pydevproject
 *.pyc
+_trial_temp
index fe63bd302d661505ecdc5b5d158a3f4aa446e70f..73c3ddef66f9bb96381782abcf1416fcd581a094 100644 (file)
@@ -16,8 +16,8 @@ from twisted.internet import reactor
 from twisted.python import usage, log
 from twisted.web2 import channel
 
-from apt_dht import AptDHT
-from apt_dht_conf import config, version
+from apt_dht.apt_dht import AptDHT
+from apt_dht.apt_dht_conf import config, version
 
 config_file = []
 
index 688b29694ee5e14dbe6d13bbddd15179dc06d4ae..3d0b9d3312ca4fc4c30c5dbecde5dbfe0ed641ba 100644 (file)
@@ -61,10 +61,10 @@ class TopLevel(resource.Resource):
             else:
                 return None, ()
         
-#        if len(name) > 1:
-        return FileDownloader(self.directory, self.manager), segments[0:]
-#        else:
-#            return self, ()
+        if len(name) > 1:
+            return FileDownloader(self.directory, self.manager), segments[0:]
+        else:
+            return self, ()
         
 if __name__ == '__builtin__':
     # Running from twistd -y
diff --git a/apt_dht/__init__.py b/apt_dht/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
index d30f0b86e1d186634a4b35da6d02dfabc6dbf481..ecbfab67e90bcc429781ee7c8b6edad2e371bb09 100644 (file)
@@ -20,5 +20,5 @@ class AptDHT:
             200,
             {'content-type': http_headers.MimeType('text', 'html')},
             """<html><body>
-            <h2>Statistics</h2>
+            <h2>P2P Download</h2>
             <p>TODO: eventually this will cause a P2P lookup.</body></html>""")