switch order of print and creation

This commit is contained in:
Eshan Ramesh 2020-05-26 00:15:12 -04:00
parent 16dd596bb2
commit b121caa321
2 changed files with 2 additions and 2 deletions

View file

@ -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(

View file

@ -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)