Change this to:

`APPSCALE_HOME = os.environ.get("APPSCALE_HOME", "/root/appscale")`

and then you can remove the next snippet which sets APPSCALE_HOME.