comparison OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py @ 4973:17c91e054636

minor improvements
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2022 12:04:48 +0200
parents cde17b68d73e
children 0ea402b4d901
comparison
equal deleted inserted replaced
4972:cde17b68d73e 4973:17c91e054636
114 raise 114 raise
115 115
116 info = r.json() 116 info = r.json()
117 COUNT_DICOM += 1 117 COUNT_DICOM += 1
118 118
119 if not info['ParentStudy'] in IMPORTED_STUDIES: 119 if (isinstance(info, dict) and
120 not info['ParentStudy'] in IMPORTED_STUDIES):
120 IMPORTED_STUDIES.add(info['ParentStudy']) 121 IMPORTED_STUDIES.add(info['ParentStudy'])
121 122
122 r2 = requests.get('%s/instances/%s/tags?short' % (args.url, info['ID']), 123 r2 = requests.get('%s/instances/%s/tags?short' % (args.url, info['ID']),
123 auth = auth) 124 auth = auth)
124 r2.raise_for_status() 125 r2.raise_for_status()