File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,16 +169,22 @@ class DictReader:
169169 A reader to parse dictionaries with odML content into an odml.Document.
170170 """
171171
172- def __init__ (self , show_warnings = True ):
172+ def __init__ (self , show_warnings = True , ignore_errors = False ):
173173 """
174174 :param show_warnings: Toggle whether to print warnings to the command line.
175175 Any warnings can be accessed via the Reader's class
176176 warnings attribute after parsing is done.
177+ :param ignore_errors: To allow loading and fixing of invalid odml files
178+ encountered errors can be converted to warnings
179+ instead. Such a document can only be saved when
180+ all errors have been addressed though.
177181 """
178182 self .parsed_doc = None # Python dictionary object equivalent
179- self .show_warnings = show_warnings
180183 self .warnings = []
181184
185+ self .show_warnings = show_warnings
186+ self .ignore_errors = ignore_errors
187+
182188 def is_valid_attribute (self , attr , fmt ):
183189 """
184190 Checks whether a provided attribute is valid for a provided odml class
You can’t perform that action at this time.
0 commit comments