summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2017-07-19 12:57:06 -0400
committerCole Robinson <crobinso@redhat.com>2017-07-19 12:57:42 -0400
commit65b0331b7243d7eee0d209c13c9b845d44dd13f5 (patch)
tree64bb142dac575d638d8cac383ac34cb27bf02a2d
parent98b5ea8b2cf84ab7ff6f9c4092552bbe0c4d86d9 (diff)
downloadvirt-manager-65b0331b7243d7eee0d209c13c9b845d44dd13f5.tar.gz
cloner: Throw explicit error if NVRAM is missing
Otherwise it comes off like a coding error
-rw-r--r--virtinst/cloner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
index 3dd5ff2c..92c71b68 100644
--- a/virtinst/cloner.py
+++ b/virtinst/cloner.py
@@ -376,6 +376,9 @@ class Cloner(object):
old_nvram = VirtualDisk(self.conn)
old_nvram.path = self._guest.os.nvram
+ if not old_nvram.get_vol_object():
+ raise RuntimeError(_("Path does not exist: %s") %
+ old_nvram.path)
nvram_install = VirtualDisk.build_vol_install(
self.conn, os.path.basename(nvram.path),