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 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) \