determine OS to correctly save journal file and to switch back to one-branch development for convenience
This commit is contained in:
parent
4620116b89
commit
89f8a1362a
|
|
@ -11,7 +11,13 @@ YEAR = now.strftime("%Y")
|
|||
MONTH = now.strftime("%m")
|
||||
DAY = now.strftime("%d")
|
||||
journal_filename = "%s-%s-%s-Journal.txt" % (YEAR, MONTH, DAY)
|
||||
journal_filename_path = "./%s" % journal_filename
|
||||
|
||||
# determine OS to correctly save journal file and to switch back to one-branch development for convenience
|
||||
if os.name == 'posix':
|
||||
journal_filename_path = "./%s" % journal_filename
|
||||
|
||||
if os.name == 'nt':
|
||||
journal_filename_path = "$Env:AppData/%s" % journal_filename
|
||||
|
||||
if not os.path.exists(journal_filename_path):
|
||||
with open(journal_filename_path, "w"):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user