Skip to content

Commit d532d24

Browse files
authored
FIX: use dict.get() to retrieve attribute key and return "None" if not available (#200)
* FIX: use dict.get() to retrieve attribute key and return "None" if not available
1 parent 1b4a535 commit d532d24

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Development version (2024-08-23)
44

55
FIX: Notebooks are now conforming to ruff's style checks by [@rcjackson](https://github.com/rcjackson), ({pull}`199`) by [@rcjackson](https://github.com/rcjackson).
6+
FIX: use dict.get() to retrieve attribute key and return "None" if not available [@kmuehlbauer](https://github.com/kmuehlbauer), ({pull}`200`) by [@kmuehlbauer](https://github.com/kmuehlbauer)
67

78
## 0.6.3 (2024-08-13)
89

xradar/io/backends/odim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def where(self):
307307
return self._where
308308

309309
def _get_odim_version(self):
310-
version = self._root.attrs["Conventions"]
310+
version = self._root.attrs.get("Conventions", "None")
311311
return version
312312

313313
def _get_site_coords(self):

0 commit comments

Comments
 (0)