doc: conf.py: Replace bare 'except' with 'except Exception'
A bare 'except:' can do some annoying stuff like eat Ctrl-C (because it catches KeyboardInterrupt). Better to use 'except Exception:' as a catch-all. Even better might be to catch some more specific exception, because even 'except Exception:' eats stuff like misspelled identifiers. Fixes this pylint warning: doc/conf.py:99:0: W0702: No exception type(s) specified (bare-except) Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
53ce10814d
commit
a07c3dc46f
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ try:
|
||||||
extraversion = val
|
extraversion = val
|
||||||
if version_major and version_minor and patchlevel and extraversion:
|
if version_major and version_minor and patchlevel and extraversion:
|
||||||
break
|
break
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
if version_major and version_minor and patchlevel and extraversion is not None:
|
if version_major and version_minor and patchlevel and extraversion is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue