<div class="gmail_quote">On 2 July 2010 20:42, Sascha Silbe <span dir="ltr"><<a href="mailto:sascha-ml-ui-sugar-devel@silbe.org">sascha-ml-ui-sugar-devel@silbe.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
TypeError should be catched in jarabe.desktop.schoolserver.register_laptop()<br>
and rethrown as a RegisterError.<br>
<br>
Sascha</blockquote><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py</font></div><div><font class="Apple-style-span" face="'courier new', monospace">index fc9ddeb..a05f56c 100644</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">--- a/src/jarabe/desktop/schoolserver.py</font></div><div><font class="Apple-style-span" face="'courier new', monospace">+++ b/src/jarabe/desktop/schoolserver.py</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">@@ -99,7 +99,7 @@ def register_laptop(url=REGISTER_URL):</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> server = ServerProxy(url)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> try:</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> data = server.register(sn, nick, uuid_, profile.pubkey)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">- except (Error, socket.error):</font></div><div><font class="Apple-style-span" face="'courier new', monospace">+ except (Error, TypeError, socket.error):</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> logging.exception('Registration: cannot connect to server')</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> raise RegisterError(_('Cannot connect to the server.'))</font></div>
<div> </div></div>