diff options
author | Jan Cholasta <jcholast@redhat.com> | 2015-06-15 10:53:22 +0000 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-07-01 13:05:30 +0000 |
commit | 7715d5bb044f891dcf420f230726b72d1695edb6 (patch) | |
tree | f7a814c48a333d4e254f7d6ec4fd16660bd9a13e /ipalib/util.py | |
parent | fe2accf77663693628835d7063da7d871b1ad268 (diff) | |
download | freeipa-7715d5bb044f891dcf420f230726b72d1695edb6.tar.gz freeipa-7715d5bb044f891dcf420f230726b72d1695edb6.tar.xz freeipa-7715d5bb044f891dcf420f230726b72d1695edb6.zip |
ipalib: Move find_modules_in_dir from util to plugable
https://fedorahosted.org/freeipa/ticket/3090
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipalib/util.py')
-rw-r--r-- | ipalib/util.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/ipalib/util.py b/ipalib/util.py index 75797229b..649a4875f 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -76,28 +76,6 @@ def get_current_principal(): raise errors.CCacheError() -# FIXME: This function has no unit test -def find_modules_in_dir(src_dir): - """ - Iterate through module names found in ``src_dir``. - """ - if not (os.path.abspath(src_dir) == src_dir and os.path.isdir(src_dir)): - return - if os.path.islink(src_dir): - return - suffix = '.py' - for name in sorted(os.listdir(src_dir)): - if not name.endswith(suffix): - continue - pyfile = os.path.join(src_dir, name) - if not os.path.isfile(pyfile): - continue - module = name[:-len(suffix)] - if module == '__init__': - continue - yield (module, pyfile) - - def validate_host_dns(log, fqdn): """ See if the hostname has a DNS A/AAAA record. |