projects
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65c7c87
)
print meaningful error message if samba-ad-provision is not installed
author
Michael Tokarev
<mjt@tls.msk.ru>
Fri, 2 Dec 2022 07:54:31 +0000
(10:54 +0300)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Mon, 8 Jan 2024 17:44:51 +0000
(20:44 +0300)
Gbp-Pq: Name meaningful-error-if-no-samba-ad-provision.patch
python/samba/provision/common.py
patch
|
blob
|
history
diff --git
a/python/samba/provision/common.py
b/python/samba/provision/common.py
index a6851b7e4c142f630b07a218acd4fd12dd6c9ae7..935918aa73f317cc51d9b529aa695a00c27e7773 100644
(file)
--- a/
python/samba/provision/common.py
+++ b/
python/samba/provision/common.py
@@
-39,7
+39,10
@@
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
def setup_add_ldif(ldb, ldif_path, subst_vars=None, controls=None):