summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-15 06:28:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-15 06:28:03 +0000
commiteb01cd3f33bb126b0f5ffbfbcb16a98e42accde7 (patch)
treefc01ab72ffbf121e2c6a254170523a28e5c44c49
parentc42829769a2dc44a091632cbea943c245f77fd2c (diff)
downloadmgaonline-eb01cd3f33bb126b0f5ffbfbcb16a98e42accde7.tar
mgaonline-eb01cd3f33bb126b0f5ffbfbcb16a98e42accde7.tar.gz
mgaonline-eb01cd3f33bb126b0f5ffbfbcb16a98e42accde7.tar.bz2
mgaonline-eb01cd3f33bb126b0f5ffbfbcb16a98e42accde7.tar.xz
mgaonline-eb01cd3f33bb126b0f5ffbfbcb16a98e42accde7.zip
handle --testing nicely
-rwxr-xr-xmdkonline8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdkonline b/mdkonline
index a46660ef..8f66f9dc 100755
--- a/mdkonline
+++ b/mdkonline
@@ -248,7 +248,7 @@ sub sendConfig {
# Check the outcome of the response
#print "REPONSE: ".$response->content."\n";
remove_wait_msg($w);
- if ($response->is_success) {
+ if ($response->is_success || $::testing) {
$result = ($response->content =~ /^TRUE(.*)/) ? 0 : -1;
#printf("Send Config :\nNEWKEY=%s\nRESPONSE=%s", $1, $response->content);
$o->{currentkey} = $1;
@@ -257,7 +257,7 @@ sub sendConfig {
$result = -1;
}
# if information were sent correctly (exit code: 0 from scp script), go to page 5
- if (! $result) {
+ if (! $result || $::testing) {
# go to last page
$o->{nb}->next_page; $o->{Next}->set_label(N("Finish")); $o->{Prev}->hide
} else {
@@ -335,7 +335,7 @@ sub testPasswd () {
my $response = $ua->request($request);
remove_wait_msg($w);
# Check the outcome of the response
- if ($response->is_success) {
+ if ($response->is_success || $::testing) {
$result = ($response->content =~ /TRUE/) ? 0 : -1;
} else {
# pb with the connection ? stay on page 2
@@ -347,7 +347,7 @@ sub testPasswd () {
}
# if correct, go to page 4
- if (! $result) {
+ if (! $result || $::testing) {
$o->{nb}->next_page();
} else {
# if incorrect, clear passwd and stay on page 2