'Cisco ASA in multi-context mode needs to have the base prompt updated
(if you switch contexts i.e. \'changeto\')
This switch of ASA contexts can occur in configuration mode. If this
happens the trailing \'(config*\' needs stripped off.'

def set_base_prompt(self, *args, **kwargs):

    cur_base_prompt = super(CiscoAsaSSH, self).set_base_prompt(*args, **kwargs)
    match = re.search(u'(.*)\\(conf.*', cur_base_prompt)
    if match:
        self.base_prompt = match.group(1)
        return self.base_prompt
