src/manage.py: Added check to see whether or not encryption is enabled before prompting for passphrase if it's empty

This commit is contained in:
Mike Cronce 2017-08-07 18:32:03 -04:00 committed by Daniel Quinn
parent 6cedbb3307
commit 8783c2af88

View File

@ -11,7 +11,7 @@ if __name__ == "__main__":
# The runserver and consumer need to have access to the passphrase, so it # The runserver and consumer need to have access to the passphrase, so it
# must be entered at start time to keep it safe. # must be entered at start time to keep it safe.
if "runserver" in sys.argv or "document_consumer" in sys.argv: if "runserver" in sys.argv or "document_consumer" in sys.argv:
if not settings.PASSPHRASE: if(settings.ENABLE_ENCRYPTION and not settings.PASSPHRASE):
settings.PASSPHRASE = input( settings.PASSPHRASE = input(
"settings.PASSPHRASE is unset. Input passphrase: ") "settings.PASSPHRASE is unset. Input passphrase: ")