From 33d0a7d9fc40328e97df910a5602e60bf8005502 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Wed, 24 Aug 2011 08:38:59 +0200 Subject: [PATCH] Raise an exception if isohybrid cannot be run on x86 --- src/pylorax/images.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pylorax/images.py b/src/pylorax/images.py index 7aae5539..75d38e06 100644 --- a/src/pylorax/images.py +++ b/src/pylorax/images.py @@ -569,11 +569,14 @@ class X86(object): stdout=subprocess.PIPE) p.wait() - if os.path.exists(ISOHYBRID): + try: # run isohybrid cmd = [ISOHYBRID, boot_fpath] p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + except OSError as e: + raise Exception("cannot run isohybrid: %s" % e) + else: p.wait() # run implantisomd5