6505c36ecc
virtman-netstats-fix.diff virtman-finish-button-fix.diff virtman-shutoff-fix.diff virtman-set-has-window-fix.diff virtman-grep-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-vcpu-count-fix.diff virtman-storage-pool-fix.diff virtman-domain-name-fix.diff virtman-unapplied-changes-fix.diff virtman-details-fix.diff virtman-delete-fix.diff virtman-collidelist-fix.diff virtman-char-device-mode-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-cpu-model-name-fix.diff virtinst-xml-clear-fix.diff virtinst-remote-storage-fix.diff virtinst-error-message-fix.diff virtinst-typo-fix.diff virtinst-cdrom.diff virtinst-storage-ocfs2.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
|
|
Subject: util: get_default_path: Handle 'None' in collidelist
|
|
From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:29:08 2011 -0400
|
|
Date: Tue Aug 30 14:29:08 2011 -0400:
|
|
Git: 9a46aa41e092e73ed1596c361acbca65ac3cbe95
|
|
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/util.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/util.py
|
|
+++ virt-manager-0.9.0/src/virtManager/util.py
|
|
@@ -126,14 +126,14 @@ def get_default_path(conn, name, collide
|
|
target, ignore, suffix = get_ideal_path_info(conn, name)
|
|
|
|
# Sanitize collidelist to work with the collision checker
|
|
- for c in collidelist[:]:
|
|
- collidelist.remove(c)
|
|
- if os.path.dirname(c) == pool.get_target_path():
|
|
- collidelist.append(os.path.basename(c))
|
|
+ newcollidelist = []
|
|
+ for c in collidelist:
|
|
+ if c and os.path.dirname(c) == pool.get_target_path():
|
|
+ newcollidelist.append(os.path.basename(c))
|
|
|
|
path = virtinst.Storage.StorageVolume.find_free_name(name,
|
|
pool_object=pool.pool, suffix=suffix,
|
|
- collidelist=collidelist)
|
|
+ collidelist=newcollidelist)
|
|
|
|
path = os.path.join(target, path)
|
|
|