[Sugar-devel] [PATCH] fixes sl#2062

Tim McNamara paperless at timmcnamara.co.nz
Sat Jul 3 07:49:50 EDT 2010


On 2 July 2010 20:42, Sascha Silbe <sascha-ml-ui-sugar-devel at silbe.org>wrote:

> TypeError should be catched in
> jarabe.desktop.schoolserver.register_laptop()
> and rethrown as a RegisterError.
>
> Sascha


diff --git a/src/jarabe/desktop/schoolserver.py
b/src/jarabe/desktop/schoolserver.py
index fc9ddeb..a05f56c 100644
--- a/src/jarabe/desktop/schoolserver.py
+++ b/src/jarabe/desktop/schoolserver.py
@@ -99,7 +99,7 @@ def register_laptop(url=REGISTER_URL):
     server = ServerProxy(url)
     try:
         data = server.register(sn, nick, uuid_, profile.pubkey)
-    except (Error, socket.error):
+    except (Error, TypeError, socket.error):
         logging.exception('Registration: cannot connect to server')
         raise RegisterError(_('Cannot connect to the server.'))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100703/88b6530b/attachment.htm 


More information about the Sugar-devel mailing list