Permalink
Browse files

Read error message only once.

Fix java.io.IOException: Stream closed
  • Loading branch information...
1 parent 45ae1e6 commit aa51770d8bf44790696eede4229f74521c13b884 @forus forus committed Nov 11, 2015
Showing with 6 additions and 4 deletions.
  1. +6 −4 grails-app/controllers/ImportXnatController.groovy
@@ -178,11 +178,13 @@ class ImportXnatController {
def process = ("python " + getScriptsLocation() + "/xnattotransmartlink/downloadscript.py ${url} ${username} ${password} ${project} ${node} ${kettledir} ${datadir}").execute(null, new File(getScriptsLocation() + "/xnattotransmartlink"))
process.waitFor()
- if (process.err.text == "") {
- flash.message = "${process.in.text}"
+ def inText = process.in.text
+ def errText = process.err.text
+ if (errText) {
+ flash.message = "${errText}</br>${inText}"
} else {
- flash.message = "${process.err.text}</br>${process.in.text}"
- }
+ flash.message = inText
+ }
redirect action: import_wizard, id: importXnatConfiguration.id
}

0 comments on commit aa51770

Please sign in to comment.