Stipulate which error is expected in try/except
PEP 8 wisely advises against the use of naked except: (unless re-raising the error). Change-Id: Ia0dfdb48b330d33ad370bdb9f6b205046aa919da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
parent
bbed8013cc
commit
bbee6fac33
@ -243,7 +243,7 @@ def _generateLocaleInfo(path, language_code, script_code, country_code, variant_
|
|||||||
numbering_system = None
|
numbering_system = None
|
||||||
try:
|
try:
|
||||||
numbering_system = findEntry(path, "numbers/defaultNumberingSystem")
|
numbering_system = findEntry(path, "numbers/defaultNumberingSystem")
|
||||||
except:
|
except xpathlite.Error:
|
||||||
pass
|
pass
|
||||||
def findEntryDef(path, xpath, value=''):
|
def findEntryDef(path, xpath, value=''):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user