import warnings
import wizard
-from wizard import scripts, shell, sql, util
+from wizard import deploy, shell, sql, util
def dsn_callback(options):
if not isinstance(options.dsn, sqlalchemy.engine.url.URL):
class ScriptsWebStrategy(Strategy):
"""Performs scripts specific guesses for web variables."""
+ # XXX: This actually isn't too scripts specific
provides = frozenset(["web_host", "web_path"])
def __init__(self, dir):
self.dir = dir
def prepare(self):
- """Uses :func:`wizard.scripts.get_web_host_and_path`."""
+ """Uses :func:`deploy.web`."""
if self.dir is None:
raise StrategyFailed
- self._url = scripts.fill_url(self.dir, None)
- if not self._url:
+ urls = deploy.web(self.dir, None)
+ if not urls:
+ raise StrategyFailed
+ try:
+ self._url = urls.next()
+ except StopIteration:
raise StrategyFailed
def execute(self, options):
"""No-op."""
self.application = application
self.dir = dir
def prepare(self):
- """Uses :func:`wizard.scripts.get_sql_credentials`"""
+ """Uses the SQL programs in the scripts locker"""
if self.application.database != "mysql":
raise StrategyFailed
try: