Skip to content

Commit

Permalink
Resolve the symlink if __main__.py is invoke as a symlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagittarian committed Apr 11, 2013
1 parent 43ff1a3 commit 8743974
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube_dl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
if __package__ is None and not hasattr(sys, "frozen"):
# direct call of __main__.py
import os.path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
path = os.path.realpath(os.path.abspath(__file__))
sys.path.append(os.path.dirname(os.path.dirname(path)))

import youtube_dl

Expand Down

0 comments on commit 8743974

Please sign in to comment.