Skip to content

Commit 897d3bb

Browse files
committed
Replace variablename in json with its value and a print bug fix
1 parent 43a5a5f commit 897d3bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layersbox

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def check_programs(programs):
109109
"""
110110
for p in programs:
111111
if not which(p):
112-
print("% is not installed! Exiting.".format(p))
112+
print("%s is not installed! Exiting." % p)
113113
return False
114114
return True
115115

@@ -776,6 +776,8 @@ def create_oidcclients(dir, service_name, oidcclient_env_files):
776776
oidc_json_file = line.split("=")[1].replace('\n', '')
777777
with open (join(servicedir, service_name, oidc_json_file), "r") as myfile:
778778
oidc_json = myfile.read().replace('\n', '')
779+
oidc_json = oidc_json.replace('LAYERS_API_URI', layers_api_uri)
780+
oidc_json = oidc_json.replace('LAYERS_APP_URI', layers_api_uri)
779781

780782
# run HTTP POST against OIDC endpoint and then save the results into the env file
781783
req = urllib2.Request(layers_api_uri + 'o/oauth2/register')

0 commit comments

Comments
 (0)