From 813e8ecdb8164f0af177934babe93592315214aa Mon Sep 17 00:00:00 2001 From: Anoop Date: Tue, 26 Mar 2019 23:08:29 -0400 Subject: [PATCH] Changes to Error Messages in Ubuntu 18.04 --- xen_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))