Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2013-01-29 10:59:36 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2013-01-29 10:59:36 (GMT)
commit298d03956f998c7295417589c4e2d275eb47f3db (patch)
tree8b09868d0346496d1fa7174dcd40b3d5f955b3c1
parent8ba2558e2906f7478252d980fb240f33a29f7e89 (diff)
Revert "Basic http server for activities"
This reverts commit 095746b83f8d4d7ef77cee01b6e62b34c9f90343.
-rw-r--r--src/jarabe/Makefile.am1
-rw-r--r--src/jarabe/http.py31
-rwxr-xr-xsrc/jarabe/main.py3
3 files changed, 0 insertions, 35 deletions
diff --git a/src/jarabe/Makefile.am b/src/jarabe/Makefile.am
index 2342bab..d926d9f 100644
--- a/src/jarabe/Makefile.am
+++ b/src/jarabe/Makefile.am
@@ -11,7 +11,6 @@ SUBDIRS = \
sugardir = $(pythondir)/jarabe
sugar_PYTHON = \
__init__.py \
- http.py \
main.py
nodist_sugar_PYTHON = config.py
diff --git a/src/jarabe/http.py b/src/jarabe/http.py
deleted file mode 100644
index 3964236..0000000
--- a/src/jarabe/http.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import mimetypes
-import threading
-import BaseHTTPServer
-import os
-
-from jarabe.model import bundleregistry
-
-class HTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
- def do_GET(self):
- splitted = self.path.split("/")
- bundle_id = splitted[1]
- path = splitted[2:]
-
- registry = bundleregistry.get_registry()
- bundle = registry.get_bundle(bundle_id)
-
- file_path = os.path.join(bundle.get_path(), *path)
- with open(file_path) as f:
- self.send_response(200)
- self.send_header('Content-type', mimetypes.guess_type(file_path))
- self.end_headers()
- self.wfile.write(f.read())
-
-class ServerThread(threading.Thread):
- def run(self):
- httpd = BaseHTTPServer.HTTPServer(('', 8000), HTTPRequestHandler)
- httpd.serve_forever()
-
-def start_server():
- thread = ServerThread()
- thread.start()
diff --git a/src/jarabe/main.py b/src/jarabe/main.py
index fa326e1..44880ba 100755
--- a/src/jarabe/main.py
+++ b/src/jarabe/main.py
@@ -258,9 +258,6 @@ def main():
sound.restore()
keyboard.setup()
- from jarabe import http
- http.start_server()
-
sys.path.append(config.ext_path)
if not intro.check_profile():