We design method usually as below:
* method to check status: such as is_alive(), return True or False.
* method to do something: such as start_vm(), just ```return``` if succeed, and raise error if fail.
This is the style the methods of class ShellSession are following. Your method exit_session should follow the second rule.

What's more, this method you are using only for virsh session, right? Because quit is not a subcommand for ShellSession. Then please move it to VirshSession in virsh.py