Skip to content

Commit 001dfff

Browse files
author
schintap
committed
add back _sc condition check
1 parent d9994b7 commit 001dfff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/broadcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def value(self):
139139
if not hasattr(self, "_value") and self._path is not None:
140140
# we only need to decrypt it here when encryption is enabled and
141141
# if its on the driver, since executor decryption is handled already
142-
if self._sc._encryption_enabled:
142+
if self._sc is not None and self._sc._encryption_enabled:
143143
port, auth_secret = self._python_broadcast.setupDecryptionServer()
144144
(decrypted_sock_file, _) = local_connect_and_auth(port, auth_secret)
145145
self._python_broadcast.waitTillBroadcastDataSent()

0 commit comments

Comments
 (0)