~dpb/charms/precise/haproxy/fix-service-entries

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: David Britton
  • Date: 2014-01-21 15:03:35 UTC
  • Revision ID: dpb@canonical.com-20140121150335-p9ozw0wwav1opxmf
Addressing sidnei[0] - use copy() dict method

Show diffs side-by-side

added added

removed removed

Lines of Context:
400
400
    service = {}
401
401
    # First come, first serve, make sure all options other than
402
402
    # "servers" are represented in the combined dict
403
 
    for key in old_service.keys():
404
 
        service[key] = old_service[key]
 
403
    service = old_service.copy()
405
404
    for key in new_service.keys():
406
405
        if key not in service:
407
406
            service[key] = new_service[key]