From: Cameron Dale Date: Sun, 16 Dec 2007 04:02:15 +0000 (-0800) Subject: Fix up the application to work with then new structure. X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=commitdiff_plain;h=1411f543eeafe083bed32f8d278a714f6bbb5391 Fix up the application to work with then new structure. --- diff --git a/.gitignore b/.gitignore index dae79de..2c4f8e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .project .pydevproject *.pyc +_trial_temp diff --git a/apt-dht.py b/apt-dht.py index fe63bd3..73c3dde 100644 --- a/apt-dht.py +++ b/apt-dht.py @@ -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 = [] diff --git a/apt_dht/HTTPServer.py b/apt_dht/HTTPServer.py index 688b296..3d0b9d3 100644 --- a/apt_dht/HTTPServer.py +++ b/apt_dht/HTTPServer.py @@ -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 index 0000000..e69de29 diff --git a/apt_dht/apt_dht.py b/apt_dht/apt_dht.py index d30f0b8..ecbfab6 100644 --- a/apt_dht/apt_dht.py +++ b/apt_dht/apt_dht.py @@ -20,5 +20,5 @@ class AptDHT: 200, {'content-type': http_headers.MimeType('text', 'html')}, """ -

Statistics

+

P2P Download

TODO: eventually this will cause a P2P lookup.""")