<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_router_by_name(self, rtr_name, tenant_id):
 """Delete the openstack router and its interfaces given its name. The interfaces should be already removed prior to calling this function. """

        try:
            routers = self.neutronclient.list_routers()
            rtr_list = routers.get('routers')
            for rtr in rtr_list:
                if rtr_name == rtr['name']:
                    self.neutronclient.delete_router(rtr['id'])
        except Exception as exc:
            LOG.error("Failed to get and delete router by name %(name)s, "
                      "Exc %(exc)s",
                      {'name': rtr_name, 'exc': str(exc)})
            return False
        return True