Changeset - 70b2a828bf1e
[Not reviewed]
stable
0 1 0
Thomas De Schampheleire - 8 years ago 2018-01-21 14:23:55
thomas.de_schampheleire@nokia.com
setup-db: print completion message to avoid confusion (issue #303)

There are cases where the last message of setup-db is a warning, giving the
impression that the overall command failed which may not actually be the
case.

For example, when git is not installed, warnings are given, but they are not
an actual error. Kallithea will work fine for Mercurial repositories.

To avoid any confusion, print a completion message at the end.
Any real errors will abort the command and not make it this far.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/setup_db.py
Show inline comments
 
@@ -99,12 +99,14 @@ class Command(AbstractInstallCommand):
 
        ep_group = conf.context.protocol
 
        dist = conf.context.distribution
 
        if dist is None:
 
            raise BadCommand(
 
                "The section %r is not the application (probably a filter).  "
 
                "You should add #section_name, where section_name is the "
 
                "section that configures your application" % plain_section)
 
        installer = self.get_installer(dist, ep_group, ep_name)
 
        installer.setup_config(
 
            self, config_file, section, self.sysconfig_install_vars(installer))
 
        self.call_sysconfig_functions(
 
            'post_setup_hook', installer, config_file)
 

	
 
        print 'Database set up successfully.'
0 comments (0 inline, 0 general)