diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-11-22 18:40:35 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-11-22 18:40:35 +0200 |
commit | ce3b5e3d1d31c58885c040cf0a963aebe63f1b9b (patch) | |
tree | 10b8f4c547684a253ab8233420e299b88ae62b76 | |
parent | 46840a56dd8837576c22107ee615efc96df15747 (diff) | |
download | jt-ce3b5e3d1d31c58885c040cf0a963aebe63f1b9b.tar.gz |
Use DraftsDir in RemoveCommand
-rwxr-xr-x | jt | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |