From a4df46082c691611c50a590c7c755fcb5165b616 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Thu, 28 Jan 2021 11:14:36 +1100 Subject: [PATCH] Backport app fixes (#586) --- MANIFEST.in | 1 + docs/changelog/index.rst | 1 + docs/changelog/v1.5.6.rst | 11 +++++++++++ docs/index.rst | 1 + pynetdicom/_version.py | 2 +- pynetdicom/apps/common.py | 10 +++++----- 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 docs/changelog/v1.5.6.rst diff --git a/MANIFEST.in b/MANIFEST.in index 76adbf7c60..f6790660a4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include pynetdicom/tests/cert_files/* include pynetdicom/tests/dicom_files/* +include pynetdicom/apps/qrscp/default.ini diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index d8ba62049f..dd0ef26f12 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -7,6 +7,7 @@ Release Notes .. toctree:: :maxdepth: 1 + v1.5.6 v1.5.5 v1.5.4 v1.5.3 diff --git a/docs/changelog/v1.5.6.rst b/docs/changelog/v1.5.6.rst new file mode 100644 index 0000000000..84fe32a95c --- /dev/null +++ b/docs/changelog/v1.5.6.rst @@ -0,0 +1,11 @@ +.. _v1.5.6: + +1.5.6 +===== + +Fixes +..... + +* Fixes for the C-STORE handler used by the `storescp`, `qrscp` and `movescu` + apps (:pr:`579`, :pr:`581`) +* Fixed the `qrscp` app's missing `default.ini` file (:issue:`583`) diff --git a/docs/index.rst b/docs/index.rst index 87abfba282..cfd130f201 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -119,6 +119,7 @@ Applications Release Notes ============= +* :doc:`v1.5.6 ` * :doc:`v1.5.5 ` * :doc:`v1.5.4 ` * :doc:`v1.5.3 ` diff --git a/pynetdicom/_version.py b/pynetdicom/_version.py index 07ae4a5b67..0ca2446bf4 100644 --- a/pynetdicom/_version.py +++ b/pynetdicom/_version.py @@ -10,7 +10,7 @@ import re -__version__ = '1.5.5' +__version__ = '1.5.6' VERSION_PATTERN = r""" diff --git a/pynetdicom/apps/common.py b/pynetdicom/apps/common.py index 90b4ebf031..ac9c96e801 100644 --- a/pynetdicom/apps/common.py +++ b/pynetdicom/apps/common.py @@ -593,9 +593,6 @@ def handle_store(event, args, app_logger): filename = '{0!s}.{1!s}'.format(mode_prefix, sop_instance) app_logger.info('Storing DICOM file: {0!s}'.format(filename)) - if os.path.exists(filename): - app_logger.warning('DICOM file already exists, overwriting') - status_ds = Dataset() status_ds.Status = 0x0000 @@ -609,8 +606,11 @@ def handle_store(event, args, app_logger): app_logger.error(" {0!s}".format(args.output_directory)) app_logger.exception(exc) # Failed - Out of Resources - IOError - status.Status = 0xA700 - return status + status_ds.Status = 0xA700 + return status_ds + + if os.path.exists(filename): + app_logger.warning('DICOM file already exists, overwriting') try: if event.context.transfer_syntax == DeflatedExplicitVRLittleEndian: