grim/local-pipelines

Make sure that the scripts are executable
draft
2016-09-10, Gary Kramlich
320a97ac5fe4
Parents 94b06e7f5d94
Children e1884b499842
Make sure that the scripts are executable
--- a/pipelines/step.py Fri Jul 29 12:38:42 2016 -0500
+++ b/pipelines/step.py Sat Sep 10 09:47:52 2016 -0500
@@ -19,6 +19,7 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import os
+import stat
import tempfile
@@ -55,4 +56,8 @@
with os.fdopen(fd, "w") as ofp:
ofp.write(str(self))
+ # now set the executebit
+ st = os.stat(filename)
+ os.chmod(filename, st.st_mode | stat.S_IEXEC)
+
return filename