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 dae79de..2c4f8e9 100644 (file)
@@ -1,3 +1,4 @@
 .project
 .pydevproject
 *.pyc
+_trial_temp
index fe63bd3..73c3dde 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 688b296..3d0b9d3 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 d30f0b8..ecbfab6 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>""")