From b121caa321377a4ccf5fa3e6bb992b2bec829cb5 Mon Sep 17 00:00:00 2001 From: Eshan Ramesh Date: Tue, 26 May 2020 00:15:12 -0400 Subject: [PATCH] switch order of print and creation --- jrnl/EncryptedJournal.py | 2 +- jrnl/Journal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/EncryptedJournal.py b/jrnl/EncryptedJournal.py index 6121f304..fe0716cb 100644 --- a/jrnl/EncryptedJournal.py +++ b/jrnl/EncryptedJournal.py @@ -43,8 +43,8 @@ class EncryptedJournal(Journal): dirname = os.path.dirname(filename) if not os.path.exists(filename): if not os.path.isdir(dirname): - print(f"[Directory {dirname} created]") os.mkdir(dirname) + print(f"[Directory {dirname} created]") self.create_file(filename) self.password = util.create_password(self.name) print( diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 45596192..3589fbdd 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -77,8 +77,8 @@ class Journal: dirname = os.path.dirname(filename) if not os.path.exists(filename): if not os.path.isdir(dirname): - print(f"[Directory {dirname} created]") os.mkdir(dirname) + print(f"[Directory {dirname} created]") self.create_file(filename) print(f"[Journal '{self.name}' created at {filename}]", file=sys.stderr)