Skip to content

Commit

Permalink
Merge pull request #893 from lsst/tickets/DM-41164
Browse files Browse the repository at this point in the history
DM-41164: Fix QG-load breakage from DM-41043.
  • Loading branch information
TallJimbo committed Oct 12, 2023
2 parents 15f4466 + 97581c4 commit 73579f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changes/DM-41164.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix QuantumGraph-load breakage introduced on DM-41043.
13 changes: 12 additions & 1 deletion python/lsst/daf/butler/datastore/record_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,18 @@ def from_simple(
for dataset_id in simple.dataset_ids:
records[dataset_id] = {}
for class_name, table_data in simple.records.items():
klass = doImportType(class_name)
try:
klass = doImportType(class_name)
except ImportError:
# Prior to DM-41043 we were embedding a lsst.daf.butler.core
# path in the serialized form, which we never wanted; fix this
# one case.
if class_name == "lsst.daf.butler.core.storedFileInfo.StoredFileInfo":
from .stored_file_info import StoredFileInfo

klass = StoredFileInfo
else:
raise
if not issubclass(klass, StoredDatastoreItemInfo):
raise RuntimeError(
"The class specified in the SerializedDatastoreRecordData "
Expand Down

0 comments on commit 73579f0

Please sign in to comment.