Skip to content

Commit 89b24e6

Browse files
committed
Merge pull request #456 from satra/enh/graphsubmission
Enh/graphsubmission
2 parents 0a36f46 + 9922b30 commit 89b24e6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,20 @@ def create_pyscript(node, updatehash=False, store_exception=True):
108108
# create python script to load and trap exception
109109
cmdstr = """import os
110110
import sys
111+
from nipype import config, logging
112+
from nipype.utils.filemanip import loadpkl, savepkl
111113
from socket import gethostname
112114
from traceback import format_exception
113115
info = None
114116
pklfile = '%s'
115117
batchdir = '%s'
116118
try:
117-
from nipype import config, logging
118-
import sys
119119
if not sys.version_info < (2, 7):
120-
from ordereddict import OrderedDict
120+
from collections import OrderedDict
121121
config_dict=%s
122122
config.update_config(config_dict)
123123
config.update_matplotlib()
124124
logging.update_logging(config)
125-
from nipype.utils.filemanip import loadpkl, savepkl
126125
traceback=None
127126
cwd = os.getcwd()
128127
info = loadpkl(pklfile)

nipype/pipeline/plugins/dagman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, **kwargs):
3535
self._template = "universe = vanilla\nnotification = Never"
3636
self._submit_specs = ""
3737
self._dagman_args = ""
38-
if 'plugin_args' in kwargs:
38+
if 'plugin_args' in kwargs and not kwargs['plugin_args'] is None:
3939
plugin_args = kwargs['plugin_args']
4040
if 'template' in plugin_args:
4141
self._template = plugin_args['template']

0 commit comments

Comments
 (0)