# HG changeset patch # User Sebastien Jodogne # Date 1551765746 -3600 # Node ID 4087505ddfe313f8a0f010d176597a768d46e097 # Parent 7dc50b474bd470782ad3d398ea798538b590df0d catching error codes of movescu diff -r 7dc50b474bd4 -r 4087505ddfe3 Tests/Tests.py --- a/Tests/Tests.py Fri Mar 01 16:39:53 2019 +0100 +++ b/Tests/Tests.py Tue Mar 05 07:02:26 2019 +0100 @@ -102,10 +102,19 @@ str(_REMOTE['DicomPort']) ] + def CallMoveScu(args): - subprocess.check_call(GetMoveScuCommand() + args, - stderr=subprocess.PIPE) - + try: + subprocess.check_call(GetMoveScuCommand() + args, + stderr=subprocess.PIPE) + except subprocess.CalledProcessError as e: + # The error code "69" corresponds to "EXITCODE_CMOVE_ERROR", + # that has been introduced in DCMTK 3.6.2. This error code is + # expected by some tests that try and C-MOVE non-existing + # DICOM instances. + # https://groups.google.com/d/msg/orthanc-users/DCRc5NeSCbM/DG-pSWj-BwAJ + if e.returncode != 69: + raise e def GenerateTestSequence():