File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,12 +103,10 @@ def default_XML_parser(get_module=False):
103103 d = _default_XML
104104 return d if not get_module else _get_XML_parser_for (d )
105105
106+
106107def _get_XML_parser_for (d ):
107108 return sys .modules [__name__ ]._XML_parser [d ]
108109
109- #def __getattr__(name):
110- # msg = f'module {__name__!r} has no attribute {name!r}'
111- # raise AttributeError(msg)
112110
113111def string_for_XML_parser (parser_enum ):
114112 return PARSER_TYPE_STRINGS [parser_enum ]
@@ -194,6 +192,7 @@ def __getattr__(name):
194192 impl = globals ().get ('__XML_parser' )
195193 if not impl :
196194 import defusedxml .ElementTree as ET_secure_xml
195+
197196 impl = __XML_parser = {
198197 XML_Parser_Type .STANDARD_XML : ET_xml ,
199198 XML_Parser_Type .QUASI_XML : ET_quasi_xml ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ def __init__(self, raw):
1414
1515 def __str__ (self ):
1616 from prettytable import PrettyTable
17+
1718 table = PrettyTable ()
1819 for col in self .cols :
1920 table .add_column (ModelBase .columns ()[col .attriInx ].icat_key , col .value )
@@ -22,6 +23,7 @@ def __str__(self):
2223
2324 def get_html_string (self , * args , ** kwargs ):
2425 from prettytable import PrettyTable
26+
2527 table = PrettyTable ()
2628 for col in self .cols :
2729 table .add_column (ModelBase .columns ()[col .attriInx ].icat_key , col .value )
You can’t perform that action at this time.
0 commit comments