summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Boddie <paul@boddie.org.uk>2014-09-12 21:51:14 +0200
committerPaul Boddie <paul@boddie.org.uk>2014-09-12 21:51:14 +0200
commit80f3525eb609893815f3604ae8dcc551b520f0bc (patch)
treec4f0ae62d38da25a527dd3f576d7673ef1bd6dda
parentaed6436f32a4c17d047b359732e86c6091152001 (diff)
downloadpykolab-80f3525eb609893815f3604ae8dcc551b520f0bc.tar.gz
Fail gracefully in check mode, producing the status.
-rw-r--r--pykolab/setup/setup_php.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pykolab/setup/setup_php.py b/pykolab/setup/setup_php.py
index 91885f4..f8e32f6 100644
--- a/pykolab/setup/setup_php.py
+++ b/pykolab/setup/setup_php.py
@@ -82,7 +82,9 @@ def _execute(*args, **kw):
php_ini = get_php_ini_file()
if not php_ini:
- if conf.php_ini_path:
+ if conf.check_only:
+ utils.setup_status("php", _("not installed"))
+ elif conf.php_ini_path:
log.error(_("Cannot configure PHP through %r (No such file or directory)") % (conf.php_ini_path))
else:
log.error(_("Could not find PHP configuration file php.ini"))