summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/getopt.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-14 22:34:22 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-14 22:34:22 +0200
commit7be47a366531e8abde03429f433593657becb750 (patch)
tree6d7bd6cf2690f776ffddfdcec71c08639a888906 /source4/scripting/python/samba/getopt.py
parent2bc26db97fea4562415956269d05ea65e5710045 (diff)
parent68a2c547d00d7a8d0c15744172489d9d010c31a3 (diff)
downloadsamba-7be47a366531e8abde03429f433593657becb750.tar.gz
samba-7be47a366531e8abde03429f433593657becb750.tar.xz
samba-7be47a366531e8abde03429f433593657becb750.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into fixbuild
(This used to be commit d2d564ad2e9b7cb0440a30a302176cce333649c7)
Diffstat (limited to 'source4/scripting/python/samba/getopt.py')
-rw-r--r--source4/scripting/python/samba/getopt.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/getopt.py b/source4/scripting/python/samba/getopt.py
index 82cb004b621..7ec684a9d6c 100644
--- a/source4/scripting/python/samba/getopt.py
+++ b/source4/scripting/python/samba/getopt.py
@@ -35,12 +35,14 @@ class SambaOptions(optparse.OptionGroup):
self._configfile = arg
def get_loadparm(self):
- import param
+ import os, param
lp = param.LoadParm()
- if self._configfile is None:
- lp.load_default()
- else:
+ if self._configfile is not None:
lp.load(self._configfile)
+ elif os.getenv("SMB_CONF_PATH") is not None:
+ lp.load(os.getenv("SMB_CONF_PATH"))
+ else:
+ lp.load_default()
return lp
class VersionOptions(optparse.OptionGroup):