human
Complete the below
def close_on_error(read_meth):

    ''''Decorator function. When calling decorated `read_meth` if an error occurs
    we\'ll proceed to invoke `inst`\'s close() method.'
    '''
assistant
#Here is the Python program you requested.
    def new_read_meth(inst):
        try:
            return read_meth(inst)
        except httplib.HTTPException:
            inst.close()
            raise
    return new_read_meth