Skip to content

Commit

Permalink
Fix bug generating proxy config in install.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fdelavega committed Dec 19, 2017
1 parent 7cc3743 commit 1277ed5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,14 @@ def proxyCommand(host, port, chargingport, glassfishport):
if not os.path.isfile("config.js"):
shutil.copy2("config.js.template", "config.js")

text = ""
with open("config.js") as f:
text = f.read()

text = text.replace("config.port = 80", "config.port = {}".format(port))\
.replace("'/proxy'", "''")

texts = text.split("\n")
texts = texts[:47] + generate_endpoints(glassfishport, chargingport) + texts[109:]
texts = texts[:59] + generate_endpoints(glassfishport, chargingport) + texts[121:]

text = "\n".join(texts)

Expand Down

0 comments on commit 1277ed5

Please sign in to comment.