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:
Edward Welbourne 2018-08-13 14:52:16 +02:00
parent bbed8013cc
commit bbee6fac33

View File

@ -243,7 +243,7 @@ def _generateLocaleInfo(path, language_code, script_code, country_code, variant_
numbering_system = None
try:
numbering_system = findEntry(path, "numbers/defaultNumberingSystem")
except:
except xpathlite.Error:
pass
def findEntryDef(path, xpath, value=''):
try: