summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-30 15:46:15 +0000
committerLars Wirzenius <liw@liw.fi>2013-10-30 15:46:15 +0000
commitebbe28410b923a35a7c0eb0b3a85933fb92ce47d (patch)
tree5e3878b4f133b8a3570bcd5771a6e024eb9e6355
parent39f4217b61567556ae2dfa936a07e797bbd997e1 (diff)
downloadjt-ebbe28410b923a35a7c0eb0b3a85933fb92ce47d.tar.gz
Require --source correctly
Non-empty value is not acceptable
-rwxr-xr-xjt4
1 files changed, 4 insertions, 0 deletions
diff --git a/jt b/jt
index 300a02d..a453368 100755
--- a/jt
+++ b/jt
@@ -79,6 +79,10 @@ class JournalTool(cliapp.Application):
self.settings.require('source')
self.settings.require('layout')
+ if not self.settings['source']:
+ raise cliapp.AppException(
+ 'The --source setting is empty or missing.')
+
if not os.path.exists(self.drafts_dir()):
os.mkdir(self.drafts_dir())