~justin-fathomdb/charms/trusty/postgresql/trunk

« back to all changes in this revision

Viewing changes to hooks/hooks.py

[stub,r=gnuoy] Don't check postgresql_stop's error code, as it doesn't have one

Show diffs side-by-side

added added

removed removed

Lines of Context:
908
908
        # /srv/juju/vol-000012345/postgresql/9.1/main
909
909
        # but keep previous "main/"  directory, by renaming it to
910
910
        # main-$TIMESTAMP
911
 
        if not postgresql_stop():
 
911
        try:
 
912
            postgresql_stop()
 
913
        except subprocess.CalledProcessError:
912
914
            log("postgresql_stop() failed - can't migrate data.", ERROR)
913
915
            return False
914
916
        if not os.path.exists(os.path.join(