mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
makedirs instead of mkdir and stderr printing
This commit is contained in:
parent
b121caa321
commit
8654023bfb
2 changed files with 4 additions and 4 deletions
|
@ -43,8 +43,8 @@ class EncryptedJournal(Journal):
|
|||
dirname = os.path.dirname(filename)
|
||||
if not os.path.exists(filename):
|
||||
if not os.path.isdir(dirname):
|
||||
os.mkdir(dirname)
|
||||
print(f"[Directory {dirname} created]")
|
||||
os.makedirs(dirname)
|
||||
print(f"[Directory {dirname} created]",file=sys.stderr)
|
||||
self.create_file(filename)
|
||||
self.password = util.create_password(self.name)
|
||||
print(
|
||||
|
|
|
@ -77,8 +77,8 @@ class Journal:
|
|||
dirname = os.path.dirname(filename)
|
||||
if not os.path.exists(filename):
|
||||
if not os.path.isdir(dirname):
|
||||
os.mkdir(dirname)
|
||||
print(f"[Directory {dirname} created]")
|
||||
os.makedirs(dirname)
|
||||
print(f"[Directory {dirname} created]",file=sys.stderr)
|
||||
self.create_file(filename)
|
||||
print(f"[Journal '{self.name}' created at {filename}]", file=sys.stderr)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue