- If you try to do an install on scripts w/o sql, it will sign you up but fail to write
the sql.cnf file. This sucks.
+- Make an awesome wizard subcommand that you can point at a file that is DOS
+ when the source wants it to be UNIX, or the other way around, and it will
+ redo the merge on that file correctly.
- wizard install wordpress should ask for password. One problem with this is that
Wordpress will still send mail with the wrong username and password, so Wordpress
# log the exception
msg = traceback.format_exc()
if command.logging_setup:
- logging.error(msg)
+ outfun = logging.error
else:
- sys.stderr.write(msg)
+ outfun = sys.stderr.write
if isinstance(e, wizard.Error):
+ if e.quiet and not command.debug:
+ msg = str(e)
+ if command.logging_setup:
+ msg = msg.replace("ERROR: ", "")
+ outfun(msg)
sys.exit(e.exitcode)
else:
+ outfun(msg)
sys.exit(1)
def get_command(name):
"""Base exception for all Wizard exceptions"""
#: Code to exit the application with.
exitcode = 1
+ #: Whether or not to suppress the backtrace (unless in debug mode)
+ quiet = False
from wizard import util
logging_setup = False
+debug = True # This will get overwritten with the real value early on
def boolish(val):
"""
self.add_option_group(group)
options, numeric_args = self.parse_args(*args, **kwargs)
setup_logger(options, numeric_args)
+ debug = options.debug
# we're going to process the global --log-dir/--seen dependency here
if hasattr(options, "seen") and hasattr(options, "log_dir"):
if not options.seen and options.log_dir:
pass
class AlreadyMigratedError(Error):
+ quiet = True
def __init__(self, dir):
self.dir = dir
def __str__(self):
"""
class AlreadyUpgraded(Error):
+ quiet = True
def __str__(self):
return """
ERROR: This autoinstall is already at the latest version."""
class MergeFailed(Error):
+ quiet = True
def __str__(self):
return """
-ERROR: Merge failed. Resolve the merge by cd'ing to the
+ERROR: Merge failed. Above is the temporary directory that
+the conflicted merge is in: resolve the merge by cd'ing to the
temporary directory, finding conflicted files with `git status`,
resolving the files, adding them using `git add` and then
running `wizard upgrade --continue`."""