Nick Ficano
commited on
Commit
·
ee3cd5d
1
Parent(s):
7c4d9fc
don't use .format to do logging interpolation.
Browse filesdoing cause the interpreter to still execute the interpolation, even if
logging is disabled or at a higher log level.
- pytube/models.py +4 -5
pytube/models.py
CHANGED
@@ -73,11 +73,10 @@ class Video(object):
|
|
73 |
start = clock()
|
74 |
try:
|
75 |
with open(fullpath, 'wb') as dst_file:
|
76 |
-
# Print downloading message
|
77 |
-
logging.info("Downloading: '
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
while True:
|
82 |
self._buffer = response.read(chunk_size)
|
83 |
if not self._buffer:
|
|
|
73 |
start = clock()
|
74 |
try:
|
75 |
with open(fullpath, 'wb') as dst_file:
|
76 |
+
# Print downloading message.
|
77 |
+
logging.info("Downloading: '%s.%s' (Bytes: %s) to path: %s",
|
78 |
+
self.filename, self.extension, sizeof(file_size),
|
79 |
+
path)
|
|
|
80 |
while True:
|
81 |
self._buffer = response.read(chunk_size)
|
82 |
if not self._buffer:
|