Skip to content
Browse files

Correctly check login failed

  • Loading branch information...
1 parent 9602435 commit 683e229081c95153b648cb2449f2c9462653f00f @asterite asterite committed Nov 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/msn/nexus.rb
View
4 lib/msn/nexus.rb
@@ -52,8 +52,8 @@ def get_binary_secret(username, password)
# Check invalid login
fault = xml.xpath("//S:Fault/faultstring")
- if fault
- raise Msn::AuthenticationError.new(fault.text)
+ if fault.length > 0
+ raise Msn::AuthenticationError.new(fault.first.text)
end
rstr = xml.xpath "//wst:RequestSecurityTokenResponse[wsp:AppliesTo/wsa:EndpointReference/wsa:Address='messengerclear.live.com']", Namespaces

0 comments on commit 683e229

Please sign in to comment.
Something went wrong with that request. Please try again.