summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-11-22 18:40:35 +0200
committerLars Wirzenius <liw@liw.fi>2014-11-22 18:40:35 +0200
commitce3b5e3d1d31c58885c040cf0a963aebe63f1b9b (patch)
tree10b8f4c547684a253ab8233420e299b88ae62b76
parent46840a56dd8837576c22107ee615efc96df15747 (diff)
downloadjt-ce3b5e3d1d31c58885c040cf0a963aebe63f1b9b.tar.gz
Use DraftsDir in RemoveCommand
-rwxr-xr-xjt5
1 files changed, 3 insertions, 2 deletions
diff --git a/jt b/jt
index 37d21b1..cd47821 100755
--- a/jt
+++ b/jt
@@ -113,7 +113,7 @@ class AttachCommand(Command):
if len(args) < 2:
raise cliapp.AppException('Usage: journal-note attach ID file...')
- drafts_dir = DraftsDir(self._app.draft_dir())
+ drafts_dir = DraftsDirectory(self._app.draft_dir())
filename = drafts_dir.get_draft_pathname(args[0])
dirname, ext = os.path.splitext(filename)
@@ -131,7 +131,8 @@ class RemoveCommand(Command):
if not args:
raise cliapp.AppException('Usage: journal-note remove ID')
- filename = self._app.draft_name(args[0])
+ drafts_dir = DraftsDirectory(self._app.drafts_dir())
+ filename = drafts_dir.get_draft_pathname(args[0])
os.remove(filename)
dirname, ext = os.path.splitext(filename)