changeset 465:038fb852e2be

more debug info
author Alain Mazy <am@osimis.io>
date Tue, 19 Apr 2022 12:14:16 +0200
parents 216231c18c2e
children fc1c3ffed470 e1867aeb57e2
files Tests/Tests.py
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Wed Apr 13 10:59:57 2022 +0200
+++ b/Tests/Tests.py	Tue Apr 19 12:14:16 2022 +0200
@@ -2430,10 +2430,15 @@
                 tmp = [ '-xs' ]
 
             with open(os.devnull, 'w') as FNULL:
-                subprocess.check_call([ FindExecutable('storescu') ] + tmp +
-                                      [ _REMOTE['Server'], str(_REMOTE['DicomPort']),
-                                        GetDatabasePath(image) ],
-                                      stderr = FNULL)
+                try:
+                    subprocess.check_call([ FindExecutable('storescu') ] + tmp +
+                                        [ _REMOTE['Server'], str(_REMOTE['DicomPort']),
+                                            GetDatabasePath(image) ],
+                                        stderr = FNULL)
+
+                except subprocess.CalledProcessError as e:
+                    print('storescu failed with error code: %s' % str(e.returncode))
+                    raise e
 
         self.assertEqual(0, len(DoGet(_REMOTE, '/patients')))