From 2038cb1b1cf7c71d15b29aa6859a8ea74c508fb8 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 9 Aug 2023 13:22:56 +0200 Subject: [PATCH 1/2] catch NeXusError in the >1.0 nexusformat version a NeXusError instead if a KeyError is thrown when a path is not available --- pyEvalData/io/source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyEvalData/io/source.py b/pyEvalData/io/source.py index fec7933..34de9d3 100644 --- a/pyEvalData/io/source.py +++ b/pyEvalData/io/source.py @@ -547,7 +547,7 @@ def save_all_scans_to_nexus(self): try: _ = nxs_file[entry_name] scan_in_nexus = True - except KeyError: + except (KeyError, nxs.NeXusError): scan_in_nexus = False if (not scan_in_nexus) or (scan.number >= last_scan_in_nexus) \ From 43d10f7fd739b8d7134c85be7affceab5704e230 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 9 Aug 2023 13:26:11 +0200 Subject: [PATCH 2/2] fix flake8 config --- .flake8 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index d497808..c9d4a00 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,17 @@ [flake8] max-line-length=99 -ignore = E121, E123, E126, E133, E226, E241, E242, E402, E704, W503, W504, W505 and W605 +ignore = + E121, + E123, + E126, + E133, + E226, + E241, + E242, + E402, + E704, + W503, + W504, + W505, + W605 exclude = docs,build,dist \ No newline at end of file