From: Eric Price Date: Wed, 10 Oct 2007 04:31:25 +0000 (-0400) Subject: Actually suppress the error, without suppressing code errors. X-Git-Tag: sipb-xen-remctl-auto/1.0.4~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/commitdiff_plain/95fa7a0a73363c4f9dbbf03368966acf21097086?hp=4d5a090ff15267db03697a074944a1b0687e94e3 Actually suppress the error, without suppressing code errors. svn path=/trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/; revision=174 --- diff --git a/files/usr/sbin/sipb-xen-lvm b/files/usr/sbin/sipb-xen-lvm index f69c2a6..183e54b 100755 --- a/files/usr/sbin/sipb-xen-lvm +++ b/files/usr/sbin/sipb-xen-lvm @@ -2,7 +2,7 @@ import sys import os.path -from subprocess import call +from subprocess import call, PIPE def check(b): if not b: @@ -15,10 +15,7 @@ subcommand = sys.argv[1] def ensureoff(machine): # Make sure the machine is off, but we don't care about errors if it is already off. - try: - rv = call(["/usr/sbin/xm", "destroy", prefix + machine]) - except: - pass + rv = call(["/usr/sbin/xm", "destroy", prefix + machine], stderr=PIPE) if subcommand == "lvcreate-all": from sipb_xen_database import *