[Pkg-libvirt-commits] [libvirt-sandbox] 16/42: image: don't assume ValueError has a multi-line message
Guido Guenther
agx at moszumanska.debian.org
Sat May 27 16:27:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian/experimental
in repository libvirt-sandbox.
commit 3eef86448ad6d36403583871065ee0a71d4c637b
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Fri Jul 15 12:50:51 2016 +0100
image: don't assume ValueError has a multi-line message
Just print out the value error text directly, instead of
trying to interpret it as a multi-line message.
Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
libvirt-sandbox/image/cli.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py
index a2e0bf1..b0d864f 100644
--- a/libvirt-sandbox/image/cli.py
+++ b/libvirt-sandbox/image/cli.py
@@ -240,9 +240,7 @@ def main():
except KeyboardInterrupt, e:
sys.exit(0)
except ValueError, e:
- for line in e:
- for l in line:
- sys.stderr.write("%s: %s\n" % (sys.argv[0], l))
+ sys.stderr.write("%s: %s\n" % (sys.argv[0], e))
sys.stderr.flush()
sys.exit(1)
except IOError, e:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt-sandbox.git
More information about the Pkg-libvirt-commits
mailing list