summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorTomas Krizek <tkrizek@redhat.com>2016-09-27 17:23:17 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-06 19:21:26 +0200
commitd7a2dfddbc2dc9ae4cea7d65e56d61a6a4d2b928 (patch)
tree20c1bf6ebf71c6276e99d9e21667b80d5db7859e /ipalib
parent74e52e86867372365d1d63561f7d1ff961b89ee0 (diff)
downloadfreeipa-d7a2dfddbc2dc9ae4cea7d65e56d61a6a4d2b928.tar.gz
freeipa-d7a2dfddbc2dc9ae4cea7d65e56d61a6a4d2b928.tar.xz
freeipa-d7a2dfddbc2dc9ae4cea7d65e56d61a6a4d2b928.zip
ipa: allow relative paths for config file
Remove unnecessary check for absolute file paths for config file. https://fedorahosted.org/freeipa/ticket/6114 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/config.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/ipalib/config.py b/ipalib/config.py
index eb6c3aed3..a273e3dfb 100644
--- a/ipalib/config.py
+++ b/ipalib/config.py
@@ -352,23 +352,10 @@ class Env(object):
containing first the number of variables that were actually set, and
second the total number of variables found in ``config_file``.
- This method will raise a ``ValueError`` if ``config_file`` is not an
- absolute path. For example:
-
- >>> env = Env()
- >>> env._merge_from_file('my/config.conf')
- Traceback (most recent call last):
- ...
- ValueError: config_file must be an absolute path; got 'my/config.conf'
-
Also see `Env._merge()`.
- :param config_file: Absolute path of the configuration file to load.
+ :param config_file: Path of the configuration file to load.
"""
- if path.abspath(config_file) != config_file:
- raise ValueError(
- 'config_file must be an absolute path; got %r' % config_file
- )
if not path.isfile(config_file):
return
parser = RawConfigParser()