diff --git a/virtconv/formats.py b/virtconv/formats.py index ff4b97f5..0bc7c4d8 100644 --- a/virtconv/formats.py +++ b/virtconv/formats.py @@ -287,7 +287,8 @@ class VirtConverter(object): disk_format = None if destdir is None: - destdir = StoragePool.get_default_dir(self.conn, build=not dry) + poolxml = StoragePool.build_default_pool(self.conn) + destdir = poolxml.target_path guest = self.get_guest() for disk in guest.devices.disk: diff --git a/virtinst/storage.py b/virtinst/storage.py index 73fe5396..b778369b 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -221,32 +221,6 @@ class StoragePool(_StorageObject): _("Couldn't create default storage pool '%s': %s") % (path, str(e))) - @staticmethod - def get_default_dir(conn, build=False): - """ - Return the default storage dir. If there's a 'default' pool, - report that. If there's no default pool, return the dir we would - use for the default. - """ - path = _preferred_default_pool_path(conn) - if (not conn.is_remote() and - not conn.support.conn_storage()): - if build and not os.path.exists(path): - os.makedirs(path) - return path - - try: - for pool in conn.fetch_all_pools(): - if pool.name == "default": - return pool.target_path - except Exception: - pass - - if build: - return StoragePool.build_default_pool(conn).target_path - return _preferred_default_pool_path(conn) - - @staticmethod def lookup_pool_by_path(conn, path): """