diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-03-08 17:03:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-03-08 17:03:48 +0000 |
commit | 2c1852faef5b6d5a769619b1c1b902d4f404aa91 (patch) | |
tree | 313a606422bfe66fd44a84d68e74999e534c1bdf /perl-install/interactive.pm | |
parent | 35f4f0312580cb9ad07cc4af3e443881ab474534 (diff) | |
download | drakx-backup-do-not-use-2c1852faef5b6d5a769619b1c1b902d4f404aa91.tar drakx-backup-do-not-use-2c1852faef5b6d5a769619b1c1b902d4f404aa91.tar.gz drakx-backup-do-not-use-2c1852faef5b6d5a769619b1c1b902d4f404aa91.tar.bz2 drakx-backup-do-not-use-2c1852faef5b6d5a769619b1c1b902d4f404aa91.tar.xz drakx-backup-do-not-use-2c1852faef5b6d5a769619b1c1b902d4f404aa91.zip |
(ask_from_listf_no_check): catch wizcancel and return undef
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 4b9079987..ea1945269 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -131,10 +131,13 @@ sub ask_from_listf_no_check { my ($o, $title, $message, $f, $l, $def, $help) = @_; if (@$l <= 2 && !$::isWizard) { - ask_from_entries_refH_powered_no_check($o, - { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), - if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, [] - ) ? $l->[0] : $l->[1]; + my $ret = eval { + ask_from_entries_refH_powered_no_check($o, + { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), + if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, [] + ) ? $l->[0] : $l->[1]; + }; + $@ =~ /^wizcancel/ ? undef : $ret; } else { ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def; } |