Use undefined variable in master_relation_broken

Bug #1468612 reported by Mitsuya Shibata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jenkins (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

master_relation_broken() is possible to use undefined value "PASSWORD".

http://bazaar.launchpad.net/~charmers/charms/trusty/jenkins/trunk/view/head:/hooks/jenkins_hooks.py#L199

---
def master_relation_broken():
    password = config('password')
    if not password:
        passwd_file = os.path.join(JENKINS_HOME, '.admin_password')
        with open(passwd_file, 'w+') as fd:
            PASSWORD = fd.read()

    for member in relation_ids():
        member = member.replace('/', '-')
        log("Removing node %s from Jenkins master." % (member), level=DEBUG)
        del_node(member, config('username'), PASSWORD) <-- if set password, PASSWORD is undefined?
---

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.