From: Douglas Bagnall Date: Sat, 17 Sep 2022 06:18:25 +0000 (+1200) Subject: py/dbcheck: improve 'please --fix' message X-Git-Tag: talloc-2.4.0~944 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c7af03945e9af7fa032dc2d8682838b0b2d5fc;p=thirdparty%2Fsamba.git py/dbcheck: improve 'please --fix' message The dbcheck module is used in places other than samba-tool (backup, provision) where the old 'use --fix' message made no sense. Also, now that we're not necessarily claiming to fix all errors, we say how many we think we can. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index 1f0662d8c05..c3485292f04 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -273,7 +273,8 @@ class dbcheck(object): "of these errors cannot be automatically fixed.") if error_count != 0 and not self.fix: - self.report("Please use --fix to fix these errors") + self.report("Please use 'samba-tool dbcheck --fix' to fix " + f"{error_count} errors") return error_count