Author: rjollos
Date: Tue Nov  5 20:24:15 2013
New Revision: 1539120

URL: http://svn.apache.org/r1539120
Log:
0.8dev: Trap return code 2 from `TracAdmin.do_initenv`.

Modified:
    bloodhound/trunk/installer/bloodhound_setup.py

Modified: bloodhound/trunk/installer/bloodhound_setup.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/installer/bloodhound_setup.py?rev=1539120&r1=1539119&r2=1539120&view=diff
==============================================================================
--- bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ bloodhound/trunk/installer/bloodhound_setup.py Tue Nov  5 20:24:15 2013
@@ -215,14 +215,15 @@ class BloodhoundSetup(object):
         trac = TracAdmin(os.path.abspath(new_env))
         if not trac.env_check():
             try:
-                trac.do_initenv('%(project)s %(db)s '
-                                '%(repo_type)s %(repo_path)s '
-                                '--inherit=%(inherit)s '
-                                '--nowiki'
-                                % options)
+                rv = trac.do_initenv('%(project)s %(db)s '
+                                     '%(repo_type)s %(repo_path)s '
+                                     '--inherit=%(inherit)s '
+                                     '--nowiki'
+                                     % options)
+                if rv == 2:
+                    raise SystemExit
             except SystemExit:
-                print ("Error: Unable to initialise the database"
-                       "Traceback for error is above")
+                print ("Error: Unable to initialise the environment.")
                 return False
         else:
             print ("Warning: Environment already exists at %s." % new_env)


Reply via email to