Browse Source

Use `insert` for all sys.path manipulations

Closes #6867.
totalwebcasting
Yen Chi Hsuan 9 years ago
committed by Jaime Marquínez Ferrándiz
parent
commit
95240b8093
6 changed files with 6 additions and 6 deletions
  1. +1
    -1
      devscripts/bash-completion.py
  2. +1
    -1
      devscripts/fish-completion.py
  3. +1
    -1
      devscripts/gh-pages/update-sites.py
  4. +1
    -1
      devscripts/make_supportedsites.py
  5. +1
    -1
      devscripts/zsh-completion.py
  6. +1
    -1
      youtube_dl/__main__.py

+ 1
- 1
devscripts/bash-completion.py View File

@ -5,7 +5,7 @@ import os
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"


+ 1
- 1
devscripts/fish-completion.py View File

@ -6,7 +6,7 @@ import os
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


+ 1
- 1
devscripts/gh-pages/update-sites.py View File

@ -6,7 +6,7 @@ import os
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


+ 1
- 1
devscripts/make_supportedsites.py View File

@ -9,7 +9,7 @@ import sys
# 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


+ 1
- 1
devscripts/zsh-completion.py View File

@ -5,7 +5,7 @@ import os
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"


+ 1
- 1
youtube_dl/__main__.py View File

@ -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__))
sys.path.append(os.path.dirname(os.path.dirname(path)))
sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
import youtube_dl


Loading…
Cancel
Save