Module: check_mk
Branch: master
Commit: cab34c5cdcd7cc21ae9381d93ce1b6021509f0c0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cab34c5cdcd7cc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 20 09:02:54 2016 +0200
Improved error message when creating backup target in CMA
---
web/htdocs/backup.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/backup.py b/web/htdocs/backup.py
index bac42a5..3132e32 100644
--- a/web/htdocs/backup.py
+++ b/web/htdocs/backup.py
@@ -1357,10 +1357,15 @@ class BackupTargetLocal(BackupTargetType):
file(test_file_path, "w")
os.unlink(test_file_path)
except IOError, e:
- raise MKUserError(varprefix,
- _("Failed to write to the configured directory. The site user needs
to be able to "
- "write the target directory. The recommended way is to make it
writable by the "
- "group \"omd\"."))
+ if is_cma():
+ raise MKUserError(varprefix,
+ _("Failed to write to the configured directory. The target
directory needs "
+ "to be writable."))
+ else:
+ raise MKUserError(varprefix,
+ _("Failed to write to the configured directory. The site user
needs to be able to "
+ "write the target directory. The recommended way is to make it
writable by the "
+ "group \"omd\"."))
# TODO: Duplicate code with mkbackup