mirror of
https://github.com/gryf/pythonhelper.git
synced 2025-12-19 04:20:20 +01:00
Lame use of exceptions. Never ever use an except block without qualifying the exception type, never ever catch exceptions from multiple sources at once.
This commit is contained in:
@@ -659,12 +659,11 @@ def deleteTags(bufferNumber):
|
|||||||
global TAGS, TAGLINENUMBERS, BUFFERTICKS
|
global TAGS, TAGLINENUMBERS, BUFFERTICKS
|
||||||
|
|
||||||
# try to delete the tags for the buffer {{{
|
# try to delete the tags for the buffer {{{
|
||||||
try:
|
for o in (TAGS, TAGLINENUMBERS, BUFFERTICKS):
|
||||||
del TAGS[bufferNumber]
|
try:
|
||||||
del TAGLINENUMBERS[bufferNumber]
|
del o[bufferNumber]
|
||||||
del BUFFERTICKS[bufferNumber]
|
except KeyError:
|
||||||
except:
|
pass
|
||||||
pass
|
|
||||||
# }}}
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user