mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Fix PEP8 for bare exceptions
This commit is contained in:
parent
52c6096b6a
commit
018ded07d6
13 changed files with 126 additions and 126 deletions
|
@ -18,7 +18,7 @@ class Section(configobj.Section, object):
|
|||
if not section.sections:
|
||||
try:
|
||||
value = list(ConfigObj.find_key(section, 'enabled'))[0]
|
||||
except:
|
||||
except Exception:
|
||||
value = 0
|
||||
if int(value) == 1:
|
||||
return section
|
||||
|
@ -28,7 +28,7 @@ class Section(configobj.Section, object):
|
|||
for subsection in subsections:
|
||||
try:
|
||||
value = list(ConfigObj.find_key(subsections, 'enabled'))[0]
|
||||
except:
|
||||
except Exception:
|
||||
value = 0
|
||||
|
||||
if int(value) != 1:
|
||||
|
@ -45,7 +45,7 @@ class Section(configobj.Section, object):
|
|||
for subsection in to_return:
|
||||
try:
|
||||
value = list(ConfigObj.find_key(to_return[subsection], key))[0]
|
||||
except:
|
||||
except Exception:
|
||||
value = None
|
||||
|
||||
if not value:
|
||||
|
@ -198,7 +198,7 @@ class ConfigObj(configobj.ConfigObj, Section):
|
|||
if not list(ConfigObj.find_key(CFG_NEW, option)):
|
||||
try:
|
||||
values.pop(option)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue