forked from ungleich-public/cdist
Use OrderedDict to guarantee order
Note: > Changed in version 3.7: Dictionary order is guaranteed to be > insertion order. This behavior was an implementation detail of > CPython from 3.6.
This commit is contained in:
parent
e19c1bb1e0
commit
704e78322e
1 changed files with 2 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
|
||||||
|
@ -201,7 +202,7 @@ def resolve_conf_dirs(configuration, add_conf_dirs):
|
||||||
conf_dirs.extend(add_conf_dirs)
|
conf_dirs.extend(add_conf_dirs)
|
||||||
|
|
||||||
# Remove duplicates.
|
# Remove duplicates.
|
||||||
conf_dirs = list(dict.fromkeys(conf_dirs))
|
conf_dirs = list(OrderedDict.fromkeys(conf_dirs))
|
||||||
return conf_dirs
|
return conf_dirs
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue