diff --git a/schema_salad/metaschema.py b/schema_salad/metaschema.py index 71b0d56f..0368e876 100644 --- a/schema_salad/metaschema.py +++ b/schema_salad/metaschema.py @@ -140,10 +140,10 @@ def __init__( self.vocab = _vocab self.rvocab = _rvocab - if namespaces is not None: + if self.namespaces is not None: self.vocab = self.vocab.copy() self.rvocab = self.rvocab.copy() - for k, v in namespaces.items(): + for k, v in self.namespaces.items(): self.vocab[k] = v self.rvocab[v] = k diff --git a/schema_salad/python_codegen_support.py b/schema_salad/python_codegen_support.py index c89b42db..ec0d64b0 100644 --- a/schema_salad/python_codegen_support.py +++ b/schema_salad/python_codegen_support.py @@ -137,10 +137,10 @@ def __init__( self.vocab = _vocab self.rvocab = _rvocab - if namespaces is not None: + if self.namespaces is not None: self.vocab = self.vocab.copy() self.rvocab = self.rvocab.copy() - for k, v in namespaces.items(): + for k, v in self.namespaces.items(): self.vocab[k] = v self.rvocab[v] = k