X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-images.git/blobdiff_plain/91cbf1beadaade4ac71d07c0214fc382fb2090c3..refs/heads/quentin:/invirt-images?ds=inline diff --git a/invirt-images b/invirt-images index e6f987d..ec79d52 100755 --- a/invirt-images +++ b/invirt-images @@ -47,8 +47,11 @@ def lvrename(dest, src): ret = lvr.wait() if ret: + stderr = lvr.stderr.read() + if 'not found' in stderr: + return 0 if verbosity > 0: - print lvr.stderr.read() + print stderr return ret lvr = subprocess.Popen(['lvrename', "xenvg/%s" % (src,), "xenvg/%s" % (dest,)], @@ -277,9 +280,9 @@ def main(): database.session.commit() elif options.action == 'update': if len(args) > 0: - images = [database.CDROM.query().get(arg) for arg in args] + images = [database.CDROM.query.get(arg) for arg in args] else: - images = database.CDROM.query().all() + images = database.CDROM.query.all() for cdrom in images: if cdrom is not None: load_image(cdrom)