Fixes a bug where encryption or decryption without target file would just bring up writing mode.

This commit is contained in:
Manuel Ebert 2012-05-31 11:43:20 +02:00
parent 11a73b4fc2
commit 1225063e61
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
Changelog Changelog
========= =========
* [Fixed] Fixes a bug where --encrypt or --decrypt without a target file would not work.
* [Improved] Supports a config option for setting word wrap. * [Improved] Supports a config option for setting word wrap.
### 0.3.0 (May 24, 2012) ### 0.3.0 (May 24, 2012)

View file

@ -63,7 +63,7 @@ def guess_mode(args, config):
"""Guesses the mode (compose, read or export) from the given arguments""" """Guesses the mode (compose, read or export) from the given arguments"""
compose = True compose = True
export = False export = False
if args.json or args.decrypt or args.encrypt or args.markdown or args.tags: if args.json or args.decrypt is not False or args.encrypt is not False or args.markdown or args.tags:
compose = False compose = False
export = True export = True
elif args.start_date or args.end_date or args.limit or args.strict or args.short: elif args.start_date or args.end_date or args.limit or args.strict or args.short: