Permalink
Browse files

Wrap f.close() with try/except block.

  • Loading branch information...
Kami committed Dec 24, 2010
1 parent 6ba9675 commit 06468d8cc5a816fb531e1809768eae54279284a9
Showing with 5 additions and 1 deletion.
  1. +5 −1 fail2ban.py
View
@@ -78,7 +78,11 @@
ips.append(ip)
except socket.error:
pass
-f.close()
+
+try:
+ f.close()
+except Exception:
+ pass
print 'metric bans int', count

0 comments on commit 06468d8

Please sign in to comment.