in relation-changed: 'NoneType' object has no attribute 'split'

Bug #1184687 reported by Patrick Hetu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql (Juju Charms Collection)
Fix Released
Undecided
Unassigned

Bug Description

In the relation-changed hook, if I don't set any roles, this line:

  roles = filter(None, relation_get('roles').split(","))

throw this error:

  AttributeError: 'NoneType' object has no attribute 'split'

A strange thing is that I got the error only on the second relation that I created.

I've attached a patch of a possible solution.

Related branches

Revision history for this message
Patrick Hetu (patrick-hetu) wrote :
Revision history for this message
Stuart Bishop (stub) wrote :

I think I fixed this as part of https://code.launchpad.net/~stub/charms/precise/postgresql/bug-1084263-fix-broken-hooks/+merge/169486 before I realized this bug was here.

Changed in postgresql (Juju Charms Collection):
status: New → In Progress
Stuart Bishop (stub)
Changed in postgresql (Juju Charms Collection):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.