From: Michael Tokarev Date: Fri, 2 Dec 2022 10:54:31 +0300 Updated: Thu, 03 Aug 2023 17:06:24 +0300 Subject: print meaningful error message if samba-ad-provision is not installed Debian-Specific: yes Forwarded: not-needed --- python/samba/provision/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/samba/provision/common.py b/python/samba/provision/common.py index a6851b7e4c1..935918aa73f 100644 --- a/python/samba/provision/common.py +++ b/python/samba/provision/common.py @@ -40,5 +40,8 @@ FILL_DRS = "DRS" def setup_path(file): """Return an absolute path to the provision template file specified by file""" - return os.path.join(setup_dir(), file) + path = os.path.join(setup_dir(), file) + if not os.path.exists(path): + raise Exception("File [%s] not found. Please install samba-ad-provision package" % path) + return path