]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/install/__init__.py
Refactor URL parsing code to be clean, support for .scripts/url
[wizard.git] / wizard / install / __init__.py
index f5388415e5f52f2ccfff7704cd1e77f739d1ac72..0af8ac439dde4e5e595756a188672ddd489f4f50 100644 (file)
@@ -129,12 +129,14 @@ class ScriptsWebStrategy(Strategy):
         self.dir = dir
     def prepare(self):
         """Uses :func:`wizard.scripts.get_web_host_and_path`."""
-        self._tuple = scripts.get_web_host_and_path(self.dir)
-        if not self._tuple:
+        self._url = scripts.fill_url(self.dir, None)
+        if not self._url:
             raise StrategyFailed
     def execute(self, options):
         """No-op."""
-        options.web_host, options.web_path = self._tuple
+        options.web_host = self._url.netloc
+        options.web_path = self._url.path
+        options.web_inferred = True # hacky: needed to see if we need a .scripts/url file
 
 class ScriptsMysqlStrategy(Strategy):
     """