Don't use bare 'except:'
They catch any exception, including KeyboardInterrupt, we don't want to catch it.
This commit is contained in:
parent
af14000215
commit
70a1165b32
8 changed files with 16 additions and 19 deletions
|
@ -52,7 +52,7 @@ class YouPornIE(InfoExtractor):
|
|||
webpage, 'JSON parameters')
|
||||
try:
|
||||
params = json.loads(json_params)
|
||||
except:
|
||||
except ValueError:
|
||||
raise ExtractorError('Invalid JSON')
|
||||
|
||||
self.report_extraction(video_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue