diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-18 16:08:01 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-07 09:21:22 +0000 |
commit | 839e5315f1e1111429af25cb05eeb250c00b86b8 (patch) | |
tree | 658dc78dca859442647165ccb0b52524c1fb706f /morphlib/morphset.py | |
parent | 770a6cb434ac31238eb2eee526e235728ce07aff (diff) | |
download | morph-839e5315f1e1111429af25cb05eeb250c00b86b8.tar.gz |
Remove code made vestigial from the `morph edit` rewrite
This was originally used by `morph edit`, but since we removed the need
to run `morph edit system stratum` and could shorten it to `morph edit
chunk`, this function is no longer used.
Diffstat (limited to 'morphlib/morphset.py')
-rw-r--r-- | morphlib/morphset.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/morphlib/morphset.py b/morphlib/morphset.py index dedbabd5..9f349db7 100644 --- a/morphlib/morphset.py +++ b/morphlib/morphset.py @@ -19,19 +19,6 @@ import morphlib -class StratumNotInSystemError(morphlib.Error): - - def __init__(self, system_name, stratum_name): - self.msg = ( - 'System %s does not contain %s' % (system_name, stratum_name)) - - -class StratumNotInSetError(morphlib.Error): - - def __init__(self, stratum_name): - self.msg = 'Stratum %s is not in MorphologySet' % stratum_name - - class ChunkNotInStratumError(morphlib.Error): def __init__(self, stratum_name, chunk_name): @@ -84,26 +71,6 @@ class MorphologySet(object): return spec.get('repo'), spec.get('ref'), name return None, None, None - def get_stratum_in_system(self, system_morph, stratum_name): - '''Return morphology for a stratum that is in a system. - - If the stratum is not in the system, raise StratumNotInSystemError. - If the stratum morphology has not been added to the set, - raise StratumNotInSetError. - - ''' - - repo_url, ref, morph = self._find_spec( - system_morph['strata'], stratum_name) - if (repo_url, ref, morph) == (None, None, None): - raise StratumNotInSystemError(system_morph['name'], stratum_name) - m = self._get_morphology(repo_url or system_morph.repo_url, - ref or system_morph.ref, - '%s.morph' % morph) - if m is None: - raise StratumNotInSetError(stratum_name) - return m - def get_chunk_triplet(self, stratum_morph, chunk_name): '''Return the repo url, ref, morph name triplet for a chunk. |