Opened 14 years ago

Closed 14 years ago

#2062 closed defect (fixed)

Trying to register to XS while offline produces in no user visible errors

Reported by: bernie Owned by: timclicks
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Unspecified Keywords: sugar-love r+
Cc: tomeu Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

How to reproduce:

  1. start sugar
  2. ensure the network is down
  3. select Register from the buddy icon menu

shell.log contains:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/jarabe/desktop/favoritesview.py", line 323, in __register_activate_cb
    schoolserver.register_laptop()
  File "/usr/lib/python2.6/site-packages/jarabe/desktop/schoolserver.py", line 101, in register_laptop
    data = server.register(sn, nick, uuid_, profile.pubkey)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1483, in __request
    allow_none=self.__allow_none)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

Attachments (1)

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

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by sascha_silbe

  • Keywords sugar-love added

comment:2 Changed 14 years ago by timclicks

  • Keywords r? added
  • Owner changed from tomeu to timclicks
  • Status changed from new to accepted

comment:3 Changed 14 years ago by timclicks

  • Keywords changed from sugar-love, r? to sugar-love r?

comment:5 Changed 14 years ago by tomeu

  • Cc tomeu added

Could someone clarify which of the two patches is being proposed?

comment:6 follow-up: Changed 14 years ago by tomeu

  • Keywords r! added; r? removed

Removing from the queue until it's clear which is the patch awaiting for review.

comment:7 in reply to: ↑ 6 Changed 14 years ago by timclicks

Replying to tomeu:

Removing from the queue until it's clear which is the patch awaiting for review.

Sorry for not responding to your earlier comment. This is the patch for review:

  • src/jarabe/desktop/schoolserver.py

    diff --git a/src/jarabe/desktop/schoolserver.py
    b/src/jarabe/desktop/schoolserver.py
    index fc9ddeb..a05f56c 100644
    a b def register_laptop(url=REGISTER_URL): 
    9999    server = ServerProxy(url)
    100100    try:
    101101        data = server.register(sn, nick, uuid_, profile.pubkey)
    102     except (Error, socket.error):
     102    except (Error, TypeError, socket.error):
    103103        logging.exception('Registration: cannot connect to server')
    104104        raise RegisterError(_('Cannot connect to the server.'))

comment:8 Changed 14 years ago by sascha_silbe

  • Keywords r? added; r! removed

comment:9 Changed 14 years ago by tomeu

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from accepted to closed

Pushed, thanks. Next time please generate the patch with git format-patch, more details in http://wiki.sugarlabs.org/go/Development_Team/Code_Review

Note: See TracTickets for help on using tickets.