Subject: [PATCH] schoolserver.register_laptop() complains when offline register_laptop() now raises the TypeError raised by xmlrpclib as a RegisterError. This also provides visual feedback to the user, prompting to connect to the network. --- src/jarabe/desktop/schoolserver.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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.'))