Merge branch 'preserve-conf-dir-sort-order' into 'master'
remove duplicates from conf dirs while preserving order See merge request ungleich-public/cdist!862
This commit is contained in:
commit
8af4f7993c
1 changed files with 4 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
from tempfile import TemporaryFile
|
from tempfile import TemporaryFile
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
import cdist
|
import cdist
|
||||||
import cdist.configuration
|
import cdist.configuration
|
||||||
|
@ -199,7 +200,9 @@ def resolve_conf_dirs(configuration, add_conf_dirs):
|
||||||
|
|
||||||
if add_conf_dirs:
|
if add_conf_dirs:
|
||||||
conf_dirs.extend(add_conf_dirs)
|
conf_dirs.extend(add_conf_dirs)
|
||||||
conf_dirs = set(conf_dirs)
|
|
||||||
|
# Remove duplicates.
|
||||||
|
conf_dirs = list(OrderedDict.fromkeys(conf_dirs))
|
||||||
return conf_dirs
|
return conf_dirs
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue