From eba414d0c34a20faa0de48aa9aea9b3d855a87de Mon Sep 17 00:00:00 2001 From: Adam Caprez <acaprez2@unl.edu> Date: Fri, 12 May 2017 15:42:30 +0000 Subject: [PATCH] Exclude *.pyc files when loading executables. --- chipathlon/workflow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chipathlon/workflow.py b/chipathlon/workflow.py index 587bf33..42bb9bc 100644 --- a/chipathlon/workflow.py +++ b/chipathlon/workflow.py @@ -181,7 +181,8 @@ class Workflow(object): # Load actual scripts for root, dirs, files in os.walk("%s/%s" % (os.path.dirname(os.path.realpath(__file__)), chipathlon.conf.job_scripts)): for f in files: - self._add_executable(f, os.path.join(root, f)) + if not os.path.splitext(f)[1] == '.pyc': + self._add_executable(f, os.path.join(root, f)) break # Handle necessary installed scripts for cmd in chipathlon.conf.system_commands: -- GitLab