1
0
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:
cheater
2012-02-08 07:26:38 +01:00
committed by cheater
parent e70cca0a11
commit c9dc1f3ec0

View File

@@ -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
# }}}
# }}}