Skip to content

FIX: Interfaces redirecting X crashed if $DISPLAY not defined #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 22, 2015
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Next release
============

* FIX: Interfaces redirecting X crashed if $DISPLAY not defined (https://github.com/nipy/nipype/pull/1027)
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
argument formatting consistent. Cleaned ants.segmentation according to PEP8.
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/ants/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _list_outputs(self):
outputs = self._outputs().get()
transmodel = self.inputs.transformation_model

# When transform is set as 'RI'/'RA', wrap fields should not be expected
# When transform is set as 'RI'/'RA', wrap fields should not be expected
# The default transformation is GR, which outputs the wrap fields
if not isdefined(transmodel) or (isdefined(transmodel) and transmodel not in ['RI', 'RA']):
outputs['warp_field'] = os.path.join(os.getcwd(),
Expand Down
7 changes: 4 additions & 3 deletions nipype/interfaces/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,10 @@ def _get_trait_desc(self, inputs, name, spec):

manhelpstr = ['\t%s' % name]

type_info = spec.full_info(inputs, name, None)
type_info = spec.full_info(inputs, name, None)
default = ', nipype default value: %s' % spec.default_value()[1]
line = "(%s%s)" % (type_info, default if spec.usedefault else '')
manhelpstr = wrap(line, 70,
manhelpstr = wrap(line, 70,
initial_indent=manhelpstr[0]+': ',
subsequent_indent='\t\t ')

Expand Down Expand Up @@ -987,7 +987,8 @@ def run(self, **inputs):
time.sleep(0.2) # give Xvfb time to start
if xvfb_proc.poll() is not None:
raise Exception('Error: Xvfb did not start')
old_displaynum = os.environ['DISPLAY']

# old_displaynum = os.getenv('DISPLAY')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete line instead of comment.

runtime.environ['DISPLAY'] = ':%s' % vdisplay_num

runtime = self._run_interface(runtime)
Expand Down