From 26834aca03816b6117ab820b926dfd975eb44448 Mon Sep 17 00:00:00 2001 From: Hechtus Date: Wed, 12 Feb 2014 09:27:45 +0100 Subject: [PATCH] Also catch login() excpetions when trying to get the mobile device ID for issue #19. --- GoogleMusic/GoogleAPI.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GoogleMusic/GoogleAPI.pm b/GoogleMusic/GoogleAPI.pm index 8b4c64b..ce413ba 100644 --- a/GoogleMusic/GoogleAPI.pm +++ b/GoogleMusic/GoogleAPI.pm @@ -40,7 +40,11 @@ sub get_device_id { return; } - if (!$webapi->login($username, $password)) { + eval { + $webapi->login($username, $password); + }; + + if (!$webapi->is_authenticated()) { return; }