Opened 12 years ago

Closed 12 years ago

#24 closed (fixed)

objects with a UUID field should accept a string

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone: 2012-09-04 client release
Component: Clients Version:
Keywords: Cc:
Dependencies:

Description

Setters which request a UUID type should accept either:

  1. An object of type uuid.UUID
  2. A string which is a valid UUID, which the setter converts to uuid.UUID type on the fly.

Change History (1)

comment:1 Changed 12 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

Tested this:

  • The code:
      slivers[sliver].uuid = uuid.UUID(sinfo['uuid'])
      print "%s (%s)" (slivers[sliver].uuid, type(slivers[sliver].uuid))
    
    yields:
    b72b0a06-beb9-4be2-94ba-cfbd8654ad82 (<class 'uuid.UUID'>)
    
  • The code:
      slivers[sliver].uuid = sinfo['uuid']
      print "%s (%s)" % (slivers[sliver].uuid, type(slivers[sliver].uuid))
    
    yields:
    b72b0a06-beb9-4be2-94ba-cfbd8654ad82 (<class 'uuid.UUID'>)
    

So this seems to be fixed, at least for slivers, which is the case i tested before.

Note: See TracTickets for help on using tickets.