diff options
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | mdkapplet-restricted-helper | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -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; |