A feature-rich command-line audio/video downloader
Use `insert` for all sys.path manipulations
Yen Chi Hsuan95240b8093c6
diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.pyindex cd26cc0895..ce68f26f9c 100755--- a/devscripts/bash-completion.py+++ b/devscripts/bash-completion.py@@ -5,7 +5,7 @@ import osfrom os.path import dirname as dirnimport sys-sys.path.append(dirn(dirn((os.path.abspath(__file__)))))+sys.path.insert(0, dirn(dirn((os.path.abspath(__file__)))))import youtube_dlBASH_COMPLETION_FILE = "youtube-dl.bash-completion"diff --git a/devscripts/fish-completion.py b/devscripts/fish-completion.pyindex c2f2387980..41629d87d0 100755--- a/devscripts/fish-completion.py+++ b/devscripts/fish-completion.py@@ -6,7 +6,7 @@ import osfrom os.path import dirname as dirnimport sys-sys.path.append(dirn(dirn((os.path.abspath(__file__)))))+sys.path.insert(0, dirn(dirn((os.path.abspath(__file__)))))import youtube_dlfrom youtube_dl.utils import shell_quotediff --git a/devscripts/gh-pages/update-sites.py b/devscripts/gh-pages/update-sites.pyindex d3ef5f0b50..503c1372fd 100755--- a/devscripts/gh-pages/update-sites.py+++ b/devscripts/gh-pages/update-sites.py@@ -6,7 +6,7 @@ import osimport textwrap# We must be able to import youtube_dl-sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))import youtube_dldiff --git a/devscripts/make_supportedsites.py b/devscripts/make_supportedsites.pyindex 3df4385a6b..8cb4a46380 100644--- a/devscripts/make_supportedsites.py+++ b/devscripts/make_supportedsites.py@@ -9,7 +9,7 @@ import sys# Import youtube_dlROOT_DIR = os.path.join(os.path.dirname(__file__), '..')-sys.path.append(ROOT_DIR)+sys.path.insert(0, ROOT_DIR)import youtube_dldiff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.pyindex f200f2c80a..04728e8e2c 100755--- a/devscripts/zsh-completion.py+++ b/devscripts/zsh-completion.py@@ -5,7 +5,7 @@ import osfrom os.path import dirname as dirnimport sys-sys.path.append(dirn(dirn((os.path.abspath(__file__)))))+sys.path.insert(0, dirn(dirn((os.path.abspath(__file__)))))import youtube_dlZSH_COMPLETION_FILE = "youtube-dl.zsh"diff --git a/youtube_dl/__main__.py b/youtube_dl/__main__.pyindex 65a0f891c5..42a0f8c6f4 100755--- a/youtube_dl/__main__.py+++ b/youtube_dl/__main__.py@@ -11,7 +11,7 @@ if __package__ is None and not hasattr(sys, "frozen"):# direct call of __main__.pyimport os.pathpath = os.path.realpath(os.path.abspath(__file__))- sys.path.append(os.path.dirname(os.path.dirname(path)))+ sys.path.insert(0, os.path.dirname(os.path.dirname(path)))import youtube_dl