From 390cc382731756455ef89bd622624873fcf561d9 Mon Sep 17 00:00:00 2001 From: nuwan_ag Date: Sat, 25 Oct 2014 17:51:11 +1100 Subject: [PATCH] Moved drmaa import to local scope. --- rubra/run_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubra/run_stage.py b/rubra/run_stage.py index 7a2290d..9a353ae 100644 --- a/rubra/run_stage.py +++ b/rubra/run_stage.py @@ -5,7 +5,6 @@ from logger import get_logger, log_info from config import get_config, get_command, get_stage_options from ruffus.drmaa_wrapper import run_job, error_drmaa_job -import drmaa GLOBAL_DRMAA_SESSION = None @@ -42,6 +41,7 @@ def distributedCommand(stage, command, options): # initialise drmaa session the first time this is called if GLOBAL_DRMAA_SESSION is None: try: + import drmaa GLOBAL_DRMAA_SESSION = drmaa.Session() GLOBAL_DRMAA_SESSION.initialize() except RuntimeError as e: