diff options
author | 2024-08-02 01:46:34 -0400 | |
---|---|---|
committer | 2024-08-02 01:46:34 -0400 | |
commit | 5ecb486e814d500e60ec5e5f6046c42a5fa6226b (patch) | |
tree | ee6d90661ff2201636f59e563341c4fbdb025176 | |
parent | 4604cff47a0af17e8cdff6c2e1fe6a6274e2f328 (diff) | |
download | notekins-5ecb486e814d500e60ec5e5f6046c42a5fa6226b.tar.xz |
Remove the post if it wasn't made successfully.
-rw-r--r-- | utils/notectl.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/notectl.py b/utils/notectl.py index f64a371..12e804e 100644 --- a/utils/notectl.py +++ b/utils/notectl.py @@ -39,6 +39,7 @@ def new_post(): p = postutil.process_post(postpath, False) if len(p.content) == 0 and len(p.media) == 0: print("No post was made.") + os.remove(postpath) return print(f"Post {os.path.basename(postpath)} made!") m = Monolith(os.path.join(conf.LOCAL_DATA_ROOT, "posts.monolith")) |