Browse Source

Get rid of dependency on dpath

dpath isn't in the OpenStack global requirements list, so it's one of
the things breaking the requirements job. Furthermore, it's only used on
one line, to avoid some trivial Python code. Just get rid of it.

Change-Id: I4d284894e48a20c60f9c57e0d2c0696dc348fb0b
Depends-On: https://review.openstack.org/604386
Zane Bitter 7 months ago
parent
commit
08ffe6bb90

+ 2
- 2
heat-config-docker-compose/install.d/50-heat-config-hook-docker-compose View File

@@ -12,6 +12,6 @@ elif [ -f /etc/redhat-release ]; then
12 12
     systemctl enable docker.service
13 13
 fi
14 14
 
15
-pip install -U dpath docker-compose==1.4.0
15
+pip install -U docker-compose==1.4.0
16 16
 
17
-install -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-docker-compose.py /var/lib/heat-config/hooks/docker-compose
17
+install -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-docker-compose.py /var/lib/heat-config/hooks/docker-compose

+ 2
- 2
heat-config-docker-compose/install.d/hook-docker-compose.py View File

@@ -13,7 +13,6 @@
13 13
 #    under the License.
14 14
 
15 15
 import ast
16
-import dpath
17 16
 import json
18 17
 import logging
19 18
 import os
@@ -85,7 +84,8 @@ def main(argv=sys.argv):
85 84
     os.chdir(proj)
86 85
 
87 86
     compose_env_files = []
88
-    for value in dpath.util.values(config, '*/env_file'):
87
+    for c in config.values():
88
+        value = c.get('env_file', None)
89 89
         if isinstance(value, list):
90 90
             compose_env_files.extend(value)
91 91
         elif isinstance(value, six.string_types):

+ 1
- 2
test-requirements.txt View File

@@ -2,7 +2,6 @@
2 2
 # of appearance. Changing the order has an impact on the overall integration
3 3
 # process, which may cause wedges in the gate later.
4 4
 coverage!=4.4,>=4.0 # Apache-2.0
5
-dpath>=1.3.2
6 5
 fixtures>=3.0.0 # Apache-2.0/BSD
7 6
 # Hacking already pins down pep8, pyflakes and flake8
8 7
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
@@ -10,7 +9,7 @@ mock>=2.0.0 # BSD
10 9
 paunch>=1.0.0 # Apache-2.0
11 10
 requests>=2.14.2 # Apache-2.0
12 11
 requests-mock>=1.1.0 # Apache-2.0
13
-salt
12
+salt>=2017.7.4 # Apache-2.0
14 13
 testrepository>=0.0.18 # Apache-2.0/BSD
15 14
 testscenarios>=0.4 # Apache-2.0/BSD
16 15
 testtools>=2.2.0 # MIT

Loading…
Cancel
Save