diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-29 10:59:28 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-29 10:59:28 (GMT) |
commit | 8ba2558e2906f7478252d980fb240f33a29f7e89 (patch) | |
tree | 2527b30d9c1857a7d5b9a1aeea03ee6737e34fa9 | |
parent | ade030943fa516eaac6df40021f4a7b15c74728a (diff) |
Revert "Server html toolkit files"
This reverts commit ade030943fa516eaac6df40021f4a7b15c74728a.
-rw-r--r-- | src/jarabe/config.py.in | 1 | ||||
-rw-r--r-- | src/jarabe/http.py | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/jarabe/config.py.in b/src/jarabe/config.py.in index e1f305d..f2a66a2 100644 --- a/src/jarabe/config.py.in +++ b/src/jarabe/config.py.in @@ -19,6 +19,5 @@ data_path = '@prefix@/share/sugar/data' locale_path = '@prefix@/share/locale' ext_path = '@prefix@/share/sugar/extensions' -html_toolkit_path = '@prefix@/share/sugar-toolkit-html' version = '@SUCROSE_VERSION@' diff --git a/src/jarabe/http.py b/src/jarabe/http.py index 518efa4..3964236 100644 --- a/src/jarabe/http.py +++ b/src/jarabe/http.py @@ -4,19 +4,17 @@ import BaseHTTPServer import os from jarabe.model import bundleregistry -from jarabe import config class HTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): splitted = self.path.split("/") - if splitted[1] == "toolkit": - base_path = config.html_toolkit_path - else: - registry = bundleregistry.get_registry() - bundle = registry.get_bundle(splitted[1]) - base_path = bundle.get_path() + bundle_id = splitted[1] + path = splitted[2:] - file_path = os.path.join(base_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)) |