Improved error report on failed install
authorFrederic Massart <fred@moodle.com>
Thu, 21 Feb 2013 06:32:29 +0000 (14:32 +0800)
committerFred <fmcell@gmail.com>
Fri, 1 Mar 2013 11:31:33 +0000 (19:31 +0800)
lib/moodle.py

index 1e2f5bf..d490b6a 100644 (file)
@@ -395,7 +395,7 @@ class Moodle(object):
         args = '--wwwroot="%s" --dataroot="%s" --dbtype="%s" --dbname="%s" --dbuser="%s" --dbpass="%s" --dbhost="%s" --fullname="%s" --shortname="%s" --adminuser="%s" --adminpass="%s" --allow-unstable --agree-license --non-interactive' % params
         result = self.cli(cli, args, stdout=None, stderr=None)
         if result[0] != 0:
-            raise Exception('Error while running the install, please manually fix the problem.')
+            raise Exception('Error while running the install, please manually fix the problem.\n- Command was: %s %s %s' % (C.get('php'), cli, args))
 
         configFile = os.path.join(self.path, 'config.php')
         os.chmod(configFile, 0666)