mirror of
https://github.com/gryf/pythonhelper.git
synced 2025-12-18 20:10:24 +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
|
||||
|
||||
# try to delete the tags for the buffer {{{
|
||||
try:
|
||||
del TAGS[bufferNumber]
|
||||
del TAGLINENUMBERS[bufferNumber]
|
||||
del BUFFERTICKS[bufferNumber]
|
||||
except:
|
||||
pass
|
||||
for o in (TAGS, TAGLINENUMBERS, BUFFERTICKS):
|
||||
try:
|
||||
del o[bufferNumber]
|
||||
except KeyError:
|
||||
pass
|
||||
# }}}
|
||||
# }}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user