aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-07-15 07:02:14 +0700
committerSergey M․ <dstftw@gmail.com>2017-07-15 07:02:57 +0700
commit961ea474b6c6965d49a58d0400d0368fa0300b19 (patch)
tree6d6478f7ff2426c78670458c1dbadc3616598227 /youtube_dl
parentea3f20494f64c18123c61f722a7864e3dbdde566 (diff)
[YoutubeDL] PEP 8
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/YoutubeDL.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 8730d32ef..89c07be29 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -20,13 +20,14 @@ import re
import shutil
import subprocess
import socket
-import string
import sys
import time
import tokenize
import traceback
import random
+from string import ascii_letters
+
from .compat import (
compat_basestring,
compat_cookiejar,
@@ -679,7 +680,7 @@ class YoutubeDL(object):
# correspondingly that is not what we want since we need to keep
# '%%' intact for template dict substitution step. Working around
# with boundary-alike separator hack.
- sep = ''.join([random.choice(string.ascii_letters) for _ in range(32)])
+ sep = ''.join([random.choice(ascii_letters) for _ in range(32)])
outtmpl = outtmpl.replace('%%', '%{0}%'.format(sep)).replace('$$', '${0}$'.format(sep))
# outtmpl should be expand_path'ed before template dict substitution