~abentley/charms/trusty/juju-reports/frequent-outcome-scan

« back to all changes in this revision

Viewing changes to hooks/common.py

  • Committer: Aaron Bentley
  • Date: 2015-02-26 17:15:51 UTC
  • mfrom: (56.1.1 no-install-if-unchanged)
  • Revision ID: aaron.bentley@canonical.com-20150226171551-cdpfpbsjdposyixo
Reinstall only when code changed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
336
336
    if not has_lp_key and config['source'].startswith('bzr+ssh'):
337
337
        hookenv.log('Incomplete config: ssh URL but no LP key')
338
338
        return
339
 
    last_source_url, last_revision = get_last_revision()
340
339
    needs_install_update = (
341
 
        (last_source_url, last_revision) != (config['source'], config['revno'])
342
 
        or config['dist-clean'])
 
340
        get_last_revision() != (config['source'], config['revno']))
343
341
    if needs_install_update:
344
342
        source_path = update_source(
345
343
            config['source'], config['revno'])