Skip to content

Commit

Permalink
Bug fix for [Errno 2] No such file or directory: 'logging.json'
Browse files Browse the repository at this point in the history
  • Loading branch information
d0u9 committed Feb 5, 2018
1 parent 3cce4ac commit db1386d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include *.rst
include *.py
include MANIFEST.in
include LICENSE
recursive-include youtube_dl_webui *.json
recursive-include youtube_dl_webui *.py
recursive-include youtube_dl_webui *.sql
recursive-include youtube_dl_webui/templates *
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup (
name='youtube_dl_webui',
version='0.2.0',
version='0.2.1',
packages=['youtube_dl_webui'],
license='GPL-2.0',
author='d0u9, yuanyingfeiyu',
Expand Down
9 changes: 8 additions & 1 deletion youtube_dl_webui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@

if __package__ is None and not hasattr(sys, 'frozen'):
path = os.path.realpath(os.path.abspath(__file__))
dirname = os.path.dirname(path)
sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
else:
path = os.path.realpath(os.path.abspath(__file__))
dirname = os.path.dirname(path)


import youtube_dl_webui

if __name__ == '__main__':
print("----" + path + "-----");
print("----" + dirname + "-----");
# Setup logger
with open('logging.json') as f:
logging_json = os.path.join(dirname, 'logging.json')
with open(logging_json) as f:
logging_conf = json.load(f)
logging.config.dictConfig(logging_conf)

Expand Down

0 comments on commit db1386d

Please sign in to comment.