Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
oprava console PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
thonzyk committed May 16, 2018
1 parent 9e2d66e commit 83ca3ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def save(title: str, content: str, url: str):
title = make_safe_filename(title)
json_file = {'title': title, 'url': url, 'content': content}
path = '../storage/'
# Při spuštění PyCharm vs konzole nesedí cesty, toto je fix
if not os.path.exists(path):
path = './storage/'
path = os.path.join(path + str(prefix) + ' - ' + title + '.json')

with io.open(path, 'w', encoding='utf8') as jsf:
Expand Down

0 comments on commit 83ca3ba

Please sign in to comment.