Ticket #2062: Provide-alert-when-XO-attempts-offline-XS-registration.patch

File Provide-alert-when-XO-attempts-offline-XS-registration.patch, 1.3 KB (added by timclicks, 13 years ago)

fix

  • src/jarabe/desktop/favoritesview.py

    From 971c5332b1297fb6e895dfbbf50a33d13831cdb3 Mon Sep 17 00:00:00 2001
    From: timClicks <paperless@timmcnamara.co.nz>
    Date: Fri, 2 Jul 2010 13:52:42 +1200
    Subject: [PATCH] Provide alert when XO attempts offline XS registration
    
    This commit fixes sl#2062. This bug causes XS registrations
    to fail silently when the XO is offline. The fix is to
    catch the TypeError & provide an alert to the user upon
    failure.
    ---
     src/jarabe/desktop/favoritesview.py |    6 ++++++
     1 files changed, 6 insertions(+), 0 deletions(-)
    
    diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
    index aca945a..45fa305 100644
    a b class FavoritesView(hippo.Canvas): 
    323323        except RegisterError, e:
    324324            alert.props.title = _('Registration Failed')
    325325            alert.props.msg = _('%s') % e
     326        except TypeError:
     327            # raised by xmlrpclib.py when XO attempts to
     328            # register itself while offline: sl#2062
     329            alert.props.title = _('Registration Failed')
     330            alert.props.msg = _('Please try connecting to '\
     331                                 'the network.')
    326332        else:
    327333            alert.props.title = _('Registration Successful')
    328334            alert.props.msg = _('You are now registered ' \