<s> """<STR_LIT>""" <EOL> from deposit_receipt import Deposit_Receipt <EOL> from server_errors import SWORD2ERRORSBYIRI , get_error <EOL> from sword2_logging import logging <EOL> ed_l = logging . getLogger ( __name__ ) <EOL> class Error_Document ( Deposit_Receipt ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , xml_deposit_receipt = None , code = None , resp = None ) : <EOL> ed_l . debug ( "<STR_LIT>" ) <EOL> if xml_deposit_receipt : <EOL> super ( Error_Document , self ) . __init__ ( xml_deposit_receipt = xml_deposit_receipt , code = code ) <EOL> else : <EOL> super ( Error_Document , self ) . __init__ ( code = code ) <EOL> self . error_href = None <EOL> self . error_info = None <EOL> self . verbose_description = None <EOL> self . content = None <EOL> self . response_headers = resp <EOL> self . _characterise_error ( ) <EOL> def _characterise_error ( self ) : <EOL> if "<STR_LIT>" in self . metadata . keys ( ) : <EOL> self . verbose_description = self . metadata [ '<STR_LIT>' ] <EOL> if self . dom != None : <EOL> ed_l . debug ( "<STR_LIT>" ) <EOL> if "<STR_LIT>" in self . dom . attrib . keys ( ) : <EOL> self . error_href = self . dom . attrib [ '<STR_LIT>' ] <EOL> self . error_info = get_error ( self . error_href , self . code ) <EOL> else : <EOL> ed_l . debug ( "<STR_LIT>" ) </s>
