Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 5024a27

Browse files
committed
Throw useful error if size not specified when implicitly creating a volume.
1 parent 644b853 commit 5024a27

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

virtinst/VirtualDisk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ def __validate_params(self):
330330
pool = util.lookup_pool_by_path(self.conn,
331331
os.path.dirname(self.path))
332332
if pool:
333+
if self.size == None:
334+
raise ValueError(_("Size must be specified for non "
335+
"existent path '%s'" % self.path))
333336
logging.debug("Path '%s' is target for pool '%s'. "
334337
"Creating volume '%s'." % \
335338
(os.path.dirname(self.path), pool.name(),

0 commit comments

Comments
 (0)