create: Fix URL autodetect timeout detection

When 'Network Install' is selected and a malformed url is entered in the
'URL:' box virt-manager will hang forever 'Detecting...'.  For example,
leave the 'http://' off the url when 'Automatically detect...' is enabled.

Signed-off-by: Charles Arnold <carnold@suse.com>
This commit is contained in:
Charles Arnold 2014-03-19 16:26:52 -06:00 committed by Cole Robinson
parent bd27910b6f
commit f113a8db29
1 changed files with 1 additions and 1 deletions

View File

@ -1908,7 +1908,7 @@ class vmmCreate(vmmGObjectUI):
try:
base = _("Detecting")
if (self.detectedDistro == -1) or (idx >= (DETECT_TIMEOUT * 2)):
if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)):
detect_str = base + ("." * ((idx % 3) + 1))
self.set_distro_labels(detect_str, detect_str)