Skip to content

Commit

Permalink
fixed pycodestyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Acribbs committed Dec 31, 2024
1 parent 9f885f0 commit 0e00123
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cgatcore/pipeline/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,17 @@ def join_statements(statements, infile, outfile=None):


def will_run_on_cluster(options):
wants_cluster = (options.get("to_cluster", True) and
not options.get("without_cluster", False))
wants_cluster = (options.get("to_cluster", True)
and not options.get("without_cluster", False))

if wants_cluster and not HAS_DRMAA:
raise ValueError("Cluster execution requested (to_cluster=True) but DRMAA library is not available. "
"Please install drmaa package in your environment to enable cluster execution.")
raise ValueError(
"Cluster execution requested (to_cluster=True) but DRMAA library is not available. "
"Please install drmaa package in your environment to enable cluster execution.")

return wants_cluster and HAS_DRMAA and GLOBAL_SESSION is not None
return (wants_cluster
and HAS_DRMAA
and GLOBAL_SESSION is not None)


class Executor(object):
Expand Down

0 comments on commit 0e00123

Please sign in to comment.