projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f962d0
)
Use `insert` for all sys.path manipulations
author
Yen Chi Hsuan
<yan12125@gmail.com>
Tue, 15 Sep 2015 13:30:24 +0000
(21:30 +0800)
committer
Jaime Marquínez Ferrándiz
<jaime.marquinez.ferrandiz@gmail.com>
Sat, 26 Sep 2015 20:04:41 +0000
(22:04 +0200)
Closes #6867.
devscripts/bash-completion.py
patch
|
blob
|
history
devscripts/fish-completion.py
patch
|
blob
|
history
devscripts/gh-pages/update-sites.py
patch
|
blob
|
history
devscripts/make_supportedsites.py
patch
|
blob
|
history
devscripts/zsh-completion.py
patch
|
blob
|
history
youtube_dl/__main__.py
patch
|
blob
|
history
diff --git
a/devscripts/bash-completion.py
b/devscripts/bash-completion.py
index cd26cc0895d033af03541f48815e8dad23f5161d..ce68f26f9ca39bd298f5d4149346af686257e042 100755
(executable)
--- a/
devscripts/bash-completion.py
+++ b/
devscripts/bash-completion.py
@@
-5,7
+5,7
@@
import os
from os.path import dirname as dirn
import sys
from os.path import dirname as dirn
import sys
-sys.path.
append(
dirn(dirn((os.path.abspath(__file__)))))
+sys.path.
insert(0,
dirn(dirn((os.path.abspath(__file__)))))
import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash-completion"
import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash-completion"
diff --git
a/devscripts/fish-completion.py
b/devscripts/fish-completion.py
index c2f2387980d0867adc3cea4c3e14047fdaf1aa28..41629d87d006fbaf4ba90cbb87bf60388fb7f7e5 100755
(executable)
--- a/
devscripts/fish-completion.py
+++ b/
devscripts/fish-completion.py
@@
-6,7
+6,7
@@
import os
from os.path import dirname as dirn
import sys
from os.path import dirname as dirn
import sys
-sys.path.
append(
dirn(dirn((os.path.abspath(__file__)))))
+sys.path.
insert(0,
dirn(dirn((os.path.abspath(__file__)))))
import youtube_dl
from youtube_dl.utils import shell_quote
import youtube_dl
from youtube_dl.utils import shell_quote
diff --git
a/devscripts/gh-pages/update-sites.py
b/devscripts/gh-pages/update-sites.py
index d3ef5f0b50daa56513118f55d5b636e5f46552a0..503c1372fd3589f45a207d043999a5286f6c5e1e 100755
(executable)
--- a/
devscripts/gh-pages/update-sites.py
+++ b/
devscripts/gh-pages/update-sites.py
@@
-6,7
+6,7
@@
import os
import textwrap
# We must be able to import youtube_dl
import 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_dl
import youtube_dl
diff --git
a/devscripts/make_supportedsites.py
b/devscripts/make_supportedsites.py
index 3df4385a6b09a520791f67f8f3958c0b635df1bf..8cb4a46380253643e6df2370058c433094cf159b 100644
(file)
--- a/
devscripts/make_supportedsites.py
+++ b/
devscripts/make_supportedsites.py
@@
-9,7
+9,7
@@
import sys
# Import youtube_dl
ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
# Import youtube_dl
ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
-sys.path.
append(
ROOT_DIR)
+sys.path.
insert(0,
ROOT_DIR)
import youtube_dl
import youtube_dl
diff --git
a/devscripts/zsh-completion.py
b/devscripts/zsh-completion.py
index f200f2c80aef4da29999ddba75bc1b17e3048a54..04728e8e2ce763ca886853061875c59e4f645921 100755
(executable)
--- a/
devscripts/zsh-completion.py
+++ b/
devscripts/zsh-completion.py
@@
-5,7
+5,7
@@
import os
from os.path import dirname as dirn
import sys
from os.path import dirname as dirn
import sys
-sys.path.
append(
dirn(dirn((os.path.abspath(__file__)))))
+sys.path.
insert(0,
dirn(dirn((os.path.abspath(__file__)))))
import youtube_dl
ZSH_COMPLETION_FILE = "youtube-dl.zsh"
import youtube_dl
ZSH_COMPLETION_FILE = "youtube-dl.zsh"
diff --git
a/youtube_dl/__main__.py
b/youtube_dl/__main__.py
index 65a0f891c5998cd49c7e1a98dbca75b6c926ccb8..42a0f8c6f4e1b902e8ce159b7494fe0c54d194d1 100755
(executable)
--- 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__.py
import os.path
path = os.path.realpath(os.path.abspath(__file__))
# direct call of __main__.py
import os.path
path = 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
import youtube_dl