srowen commented on a change in pull request #23571:
[SPARK-26640][CORE][ML][SQL][STREAMING][PYSPARK] Code cleanup from lgtm.com
analysis
URL: https://github.com/apache/spark/pull/23571#discussion_r248520453
##########
File path: python/pyspark/java_gateway.py
##########
@@ -174,8 +173,7 @@ def local_connect_and_auth(port, auth_secret):
errors.append("tried to connect to %s, but an error occured: %s" %
(sa, emsg))
sock.close()
sock = None
- else:
- raise Exception("could not open socket: %s" % errors)
+ raise Exception("could not open socket: %s" % errors)
Review comment:
`else:` with `for` doesn't do anything different if there's no `break`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]