Skip to content

Replace chars when standard out can't be decoded #2238

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 4 commits into from
Oct 20, 2017
Merged

Conversation

oesteban
Copy link
Contributor

Fixes #2235

@oesteban oesteban requested a review from satra October 19, 2017 19:15
@oesteban
Copy link
Contributor Author

Tests are passing, should we go ahead?

@satra
Copy link
Member

satra commented Oct 19, 2017

@oesteban - could we do a try .. except, so that we know when this happened, in case it stripped out meaningful things, and log that.

@codecov-io
Copy link

codecov-io commented Oct 19, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@66411f4). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2238   +/-   ##
=========================================
  Coverage          ?   72.32%           
=========================================
  Files             ?     1182           
  Lines             ?    58955           
  Branches          ?     8486           
=========================================
  Hits              ?    42639           
  Misses            ?    14932           
  Partials          ?     1384
Flag Coverage Δ
#smoketests 72.32% <100%> (?)
#unittests 69.89% <100%> (?)
Impacted Files Coverage Δ
nipype/interfaces/base.py 85.25% <100%> (ø)
nipype/utils/filemanip.py 85.06% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66411f4...70ab1aa. Read the comment docs.

@oesteban
Copy link
Contributor Author

@satra WDYT?

except UnicodeDecodeError as err:
out = stream.decode(default_encoding, errors='replace')
logger.warning('Error decoding string: %s', err)
return out.split('\n')
Copy link
Member

Choose a reason for hiding this comment

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

out.splitlines() is robust to '\n' vs '\r' vs '\r\n', if that's a possible issue.

@effigies
Copy link
Member

This looks fine to me, but I'll leave the decision to @satra.

@satra
Copy link
Member

satra commented Oct 20, 2017

LGTM as well - @oesteban - are you going to make the change @effigies suggested? i think this is ready for merge.

@satra satra added this to the 0.14.0 milestone Oct 20, 2017
@oesteban
Copy link
Contributor Author

Let's merge in 2h 30m when tests pass with @effigies suggestion :)

@effigies
Copy link
Member

I think we can be pretty confident it will build successfully, so might as well build on master, rather than here and then on master. IMHO.

@oesteban
Copy link
Contributor Author

Let's do it

@oesteban oesteban merged commit e4e95f3 into master Oct 20, 2017
@oesteban oesteban deleted the oesteban-patch-3 branch October 20, 2017 16:02
@satra satra modified the milestone: 0.14.0 Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants