Skip to content

Commit

Permalink
Also catch login() excpetions when trying to get the mobile device ID…
Browse files Browse the repository at this point in the history
… for issue #19.
  • Loading branch information
hechtus committed Feb 12, 2014
1 parent eed568b commit 26834ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GoogleMusic/GoogleAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ sub get_device_id {
return;
}

if (!$webapi->login($username, $password)) {
eval {
$webapi->login($username, $password);
};

if (!$webapi->is_authenticated()) {
return;
}

Expand Down

0 comments on commit 26834ac

Please sign in to comment.