Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions sdks/python/apache_beam/runners/portability/prism_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,13 @@ def _prepare_executable(

_LOGGER.info("Prism binary path resolved to: %s", target_url)
# Make sure the binary is executable.
st = os.stat(target_url)
os.chmod(target_url, st.st_mode | stat.S_IEXEC)
try:
st = os.stat(target_url)
os.chmod(target_url, st.st_mode | stat.S_IEXEC)
except PermissionError:
_LOGGER.warning(
'Could not change permissions of prism binary; invoking may fail if '
+ 'current process does not have exec permissions on binary.')
return target_url

@staticmethod
Expand Down
Loading