We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c537c16 commit 80734b7Copy full SHA for 80734b7
sdks/python/apache_beam/runners/portability/prism_runner.py
@@ -181,8 +181,13 @@ def _prepare_executable(
181
182
_LOGGER.info("Prism binary path resolved to: %s", target_url)
183
# Make sure the binary is executable.
184
- st = os.stat(target_url)
185
- os.chmod(target_url, st.st_mode | stat.S_IEXEC)
+ try:
+ st = os.stat(target_url)
186
+ os.chmod(target_url, st.st_mode | stat.S_IEXEC)
187
+ except PermissionError:
188
+ _LOGGER.warning(
189
+ 'Could not change permissions of prism binary; invoking may fail if '
190
+ + 'current process does not have exec permissions on binary.')
191
return target_url
192
193
@staticmethod
0 commit comments