Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-10625: Make a copy of spec when resolving it #12

Merged
merged 1 commit into from
May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/lsst/verify/specset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from past.builtins import basestring

from collections import OrderedDict
import copy
import os
import re

Expand Down Expand Up @@ -720,6 +721,10 @@ def resolve_document(self, spec_doc):
Raised when a document's bases cannot be resolved (an inherited
`~lsst.validate.base.Specification` cannot be found in the repo).
"""
# Create a copy of the spec_doc so that if the resolution is aborted
# we haven't modified the original document
spec_doc = copy.deepcopy(spec_doc)

# Goal is to process all specifications and partials mentioned in
# the 'base' field (first in, first out) and merge their information
# to the spec_doc.
Expand Down