Skip to content

Commit d8e4bde

Browse files
committed
Move DuplicateObjectKeyError to errors module
1 parent 9245d94 commit d8e4bde

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

pystac/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pystac.errors import (
77
STACError,
88
STACTypeError,
9+
DuplicateObjectKeyError,
910
ExtensionAlreadyExistsError,
1011
ExtensionNotImplemented,
1112
ExtensionTypeError,

pystac/errors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ class STACTypeError(Exception):
1919
pass
2020

2121

22+
class DuplicateObjectKeyError(Exception):
23+
"""Raised when deserializing a JSON object containing a duplicate key."""
24+
25+
pass
26+
27+
2228
class ExtensionTypeError(Exception):
2329
"""An ExtensionTypeError is raised when an extension is used against
2430
an object that the extension does not apply to

pystac/stac_io.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,6 @@ def write_text_to_href(
293293
f.write(txt)
294294

295295

296-
class DuplicateObjectKeyError(Exception):
297-
pass
298-
299-
300296
class DuplicateKeyReportingMixin(StacIO):
301297
"""A mixin for StacIO implementations that will report
302298
on duplicate keys in the JSON being read in.

0 commit comments

Comments
 (0)