summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet-restricted-helper9
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5bf9097a..26b48a8f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
o do not display PowerPack but real product name (#52292)
o on MES5, offer to add update media from authenticated server
- mdkapplet
+ o gracefully handle (rare) server issues (#51548)
o if current distribution is no more supported, warn so and offer to
upgrade to latest release
- mdkapplet-upgrade-helper
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index e774d117..181cf492 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -118,7 +118,14 @@ sub add_restricted_medium {
my $res = get_from("https://my.mandriva.com/rest/authenticate", [ 'username', $email, 'password', $password,
'return', 'userdata' ]);
- my $ref = XML::Simple->new->XMLin($res->{_content});
+ my $ref = eval { XML::Simple->new->XMLin($res->{_content}) };
+ if (my $err = $@) {
+ warn ">> XML error: $err\n";
+ $ref = {
+ code => 1,
+ message => $err,
+ };
+ }
if ($ref->{code} != 0) {
my $in = interactive->vnew;