diff --git a/xen_api.py b/xen_api.py index 3b4f23b..44ad9e8 100755 --- a/xen_api.py +++ b/xen_api.py @@ -227,7 +227,7 @@ def remove_bridge(self, name): p = Popen(cmd.split(), stdout=PIPE, stderr=PIPE) out, err = p.communicate() if not p.returncode == 0: - if 'No such device' in err.rstrip(): + if 'Cannot find device' in err.rstrip(): pass else: logger.error('Error while stopping bridge - {}'.format(cmd)) @@ -240,7 +240,7 @@ def remove_bridge(self, name): p = Popen(cmd.split(), stdout=PIPE, stderr=PIPE) out, err = p.communicate() if not p.returncode == 0: - if 'No such device' in err.rstrip(): + if "doesn't exist" in err.rstrip(): pass else: logger.error('Error while removing bridge - {}'.format(cmd))