mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 23:35:45 +00:00
Apply suggestions from code review
This commit is contained in:
parent
14297874f1
commit
40b4b691ee
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ class YoutubeDL(youtube_dl.YoutubeDL):
|
|||
def _file_md5(fn, length=None):
|
||||
with open(fn, 'rb') as f:
|
||||
return hashlib.md5(
|
||||
f.read(length) if length is not None else f.read()).hexdigest()
|
||||
f.read() if length is None else f.read(length)).hexdigest()
|
||||
|
||||
|
||||
defs = gettestcases()
|
||||
|
@ -94,7 +94,7 @@ class TestDownload(unittest.TestCase):
|
|||
def addTest(cls, test_method, test_method_name, add_ie):
|
||||
test_method.__name__ = str(test_method_name)
|
||||
test_method.add_ie = add_ie
|
||||
setattr(TestDownload, test_method.__name__, test_method)
|
||||
setattr(cls, test_method.__name__, test_method)
|
||||
del test_method
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in a new issue