Skip to content

Commit

Permalink
add back _sc condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
schintap committed Nov 28, 2018
1 parent d9994b7 commit 001dfff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def value(self):
if not hasattr(self, "_value") and self._path is not None:
# we only need to decrypt it here when encryption is enabled and
# if its on the driver, since executor decryption is handled already
if self._sc._encryption_enabled:
if self._sc is not None and self._sc._encryption_enabled:
port, auth_secret = self._python_broadcast.setupDecryptionServer()
(decrypted_sock_file, _) = local_connect_and_auth(port, auth_secret)
self._python_broadcast.waitTillBroadcastDataSent()
Expand Down

0 comments on commit 001dfff

Please sign in to comment.