On 04/01/2010 04:09 PM, John O'Brien wrote:
> Public bug reported:
>
> I deleted a share on the web, and got the following a few seconds later
> in the client:
>
> 2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SV_SHARE_CHANGED, args:(), kw:{'info': UUID('eb16a306-6875-460b-ad07-8f43ea9fbc47'), 'message': 'deleted'}
> 2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - ERROR - Error encountered while handling: SV_SHARE_CHANGED in<ubuntuone.syncdaemon.volume_manager.VolumeManager object at 0x33931d0>
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/event_queue.py", line 790, in _dispatch
> method(*args, **kwargs)
> File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 541, in handle_SV_SHARE_CHANGED
> self.log.debug('share deleted! %s', info.share_id)
> AttributeError: 'UUID' object has no attribute 'share_id
>
> ** Affects: ubuntuone-client
> Importance: Undecided
> Status: New
>
>
The error is caused because the client handler does not match what the
protocol sends to it. And the tests conform to what the client expects
and not what the protocol sends:
The protocol:
if msg.type == protocol_pb2.Message.NOTIFY_SHARE:
info =
sharersp.NotifyShareHolder.load_from_msg(msg.notify_share) self._share_change_callback("changed", info)
elif msg.type == protocol_pb2.Message.SHARE_DELETED: self._share_change_callback("deleted",
On 04/01/2010 04:09 PM, John O'Brien wrote: SyncDaemon. EQ - DEBUG - push_event: SV_SHARE_CHANGED, args:(), kw:{'info': UUID('eb16a306- 6875-460b- ad07-8f43ea9fbc 47'), 'message': 'deleted'} SyncDaemon. EQ - ERROR - Error encountered while handling: SV_SHARE_CHANGED in<ubuntuone. syncdaemon. volume_ manager. VolumeManager object at 0x33931d0> python2. 6/dist- packages/ ubuntuone/ syncdaemon/ event_queue. py", line 790, in _dispatch python2. 6/dist- packages/ ubuntuone/ syncdaemon/ volume_ manager. py", line 541, in handle_ SV_SHARE_ CHANGED debug(' share deleted! %s', info.share_id)
> Public bug reported:
>
> I deleted a share on the web, and got the following a few seconds later
> in the client:
>
> 2010-04-01 16:05:26,829 - ubuntuone.
> 2010-04-01 16:05:26,829 - ubuntuone.
> Traceback (most recent call last):
> File "/usr/lib/
> method(*args, **kwargs)
> File "/usr/lib/
> self.log.
> AttributeError: 'UUID' object has no attribute 'share_id
>
> ** Affects: ubuntuone-client
> Importance: Undecided
> Status: New
>
>
The error is caused because the client handler does not match what the
protocol sends to it. And the tests conform to what the client expects
and not what the protocol sends:
The protocol:
if msg.type == protocol_ pb2.Message. NOTIFY_ SHARE: NotifyShareHold er.load_ from_msg( msg.notify_ share)
self. _share_ change_ callback( "changed" , info) pb2.Message. SHARE_DELETED:
self. _share_ change_ callback( "deleted" ,
info =
sharersp.
elif msg.type == protocol_
uuid.UUID( msg.share_ deleted. share_id) )
The client: SV_SHARE_ CHANGED( self, message, info):
self. log.debug( "New share notification, share_id: %s",
info. share_id)
dir_ name = self._build_ share_path( info.share_ name,
info. from_visible_ name)
path = os.path. join(self. m.shares_ dir, dir_name)
share = Share.from_ notify_ holder( info, path)
self. add_share( share)
self. log.debug( 'share changed! %s', info.share_id)
self. share_changed( info)
self. log.debug( 'share deleted! %s', info.share_id)
self. share_deleted( str(info. share_id) )
def handle_
""" handle SV_SHARE_CHANGED event """
if message == 'changed':
if str(info.share_id) not in self.shares:
else:
elif message == 'deleted':