summaryrefslogtreecommitdiffstats
path: root/mdkapplet-restricted-helper
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-07-28 12:33:38 +0000
committerThierry Vignaud <tv@mandriva.org>2009-07-28 12:33:38 +0000
commit8585f58cc94e9cd73ef28c9a2bcbb8106353358f (patch)
treeb3ba4d3b80c9a62de663c9974eb2360f9b2eb93b /mdkapplet-restricted-helper
parent35db8adc23041e6aaf4c2b41849167e0749f7f97 (diff)
downloadmgaonline-8585f58cc94e9cd73ef28c9a2bcbb8106353358f.tar
mgaonline-8585f58cc94e9cd73ef28c9a2bcbb8106353358f.tar.gz
mgaonline-8585f58cc94e9cd73ef28c9a2bcbb8106353358f.tar.bz2
mgaonline-8585f58cc94e9cd73ef28c9a2bcbb8106353358f.tar.xz
mgaonline-8585f58cc94e9cd73ef28c9a2bcbb8106353358f.zip
(xml2perl) factorize code (needed for next commit)
Diffstat (limited to 'mdkapplet-restricted-helper')
-rwxr-xr-xmdkapplet-restricted-helper11
1 files changed, 2 insertions, 9 deletions
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index f2737061..55e55265 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -116,17 +116,10 @@ my $error;
sub add_restricted_medium {
my ($email, $password) = @_;
- my $res = get_from("https://my.mandriva.com/rest/authenticate",
+ my $res = get_from("https://my.mandriva.com/rest/authenticate2",
[ 'username', $email, 'password', $password,
'return', 'userdata' ]);
- my $ref = eval { XML::Simple->new->XMLin($res->{_content}) };
- if (my $err = $@) {
- warn ">> XML error: $err\n";
- $ref = {
- code => 1,
- message => $err,
- };
- }
+ my $ref = xml2perl($res);
if ($ref->{code} != 0) {
my $in = interactive->vnew;