git » msnlib » commit fd799f2

Fix the AuthError exception

author Alberto Bertogli
2011-05-10 19:43:52 UTC
committer Alberto Bertogli
2011-05-10 19:43:52 UTC
parent 00061ce2c4f0024fff43414908f8f1230fadc54c

Fix the AuthError exception

The associated information must be a tuple, not a list, since otherwise
the exception handling code will get a one element tuple with the list
inside, which not only is horrible but it also breaks the API.

This commit changes that into a tuple, which provides the expected
behaviour.

In the future we should move to just use the recommended form:

	raise AuthError(911, 'SSL Auth failed')

but since we're close to a release, we're going with the least invasive
change for now.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

msnlib.py +1 -1

diff --git a/msnlib.py b/msnlib.py
index cf1dce0..055d795 100644
--- a/msnlib.py
+++ b/msnlib.py
@@ -591,7 +591,7 @@ class msnd:
 			# for now we raise 911, which means authentication
 			# failed; but maybe we can get more detailed
 			# information
-			raise AuthError, [911, 'SSL Auth failed']
+			raise AuthError, (911, 'SSL Auth failed')
 
 		# and parse the headers to get the passport id
 		try: