Skip to content

Commit

Permalink
Further clarify warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Aug 20, 2014
1 parent e96a7a0 commit 742f823
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/pyspark/java_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ def preexec_func():
(stdout, _) = proc.communicate()
exit_code = proc.poll()
error_msg = "Launching GatewayServer failed"
error_msg += " with exit code %d! " % exit_code if exit_code else "! "
error_msg += " with exit code %d!\n" % exit_code if exit_code else "!\n"
error_msg += "Warning: Expected GatewayServer to output a port, but found "
if gateway_port == "" and stdout == "":
error_msg += "(Warning: no output detected.)\n"
error_msg += "no output.\n"
else:
error_msg += "(Warning: unexpected output detected.)\n\n"
error_msg += "the following:\n\n"
error_msg += "--------------------------------------------------------------\n"
error_msg += gateway_port + stdout
error_msg += "--------------------------------------------------------------\n"
Expand Down

0 comments on commit 742f823

Please sign in to comment.