Skip to content

Commit fecb624

Browse files
committed
fix path overrides in python3 when generating the testconfig
1 parent 787f546 commit fecb624

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

envhelp/makeconfig.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ def write_testconfig(env_name, is_py2=False):
5858
'destination': os.path.join(_ENVHELP_OUTPUT_DIR, confs_name),
5959
'destination_suffix': "-py%s" % ('2' if is_py2 else '3',),
6060
}
61+
6162
if is_py2:
62-
overrides.update(**{
63-
'mig_code': '/usr/src/app/mig',
64-
'mig_certs': '/usr/src/app/envhelp/output/certs',
65-
'mig_state': '/usr/src/app/envhelp/output/state',
66-
})
63+
conf_dir_path = '/usr/src/app'
64+
else:
65+
conf_dir_path = _ENVHELP_OUTPUT_DIR
66+
overrides.update(**{
67+
'mig_code': os.path.join(conf_dir_path, 'mig'),
68+
'mig_certs': os.path.join(conf_dir_path, 'certs'),
69+
'mig_state': os.path.join(conf_dir_path, 'state'),
70+
})
71+
6772
generate_confs(_ENVHELP_OUTPUT_DIR, **overrides)
6873

6974

0 commit comments

Comments
 (0)