Skip to content
Browse files

Python 3 compatible except clauses.

  • Loading branch information...
1 parent b5ab1da commit 1863902447ff8d5696e048bd494e66edbbd334b2 @bbangert committed Aug 13, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 beaker/container.py
  2. +3 −3 beaker/util.py
View
2 beaker/container.py
@@ -679,7 +679,7 @@ def do_close(self):
def do_remove(self):
try:
os.remove(self.file)
- except OSError, err:
+ except OSError:
# for instance, because we haven't yet used this cache,
# but client code has asked for a clear() operation...
pass
View
6 beaker/util.py
@@ -31,8 +31,8 @@
from threading import local as _tlocal
-__all__ = ["ThreadLocal", "Registry", "WeakValuedRegistry", "SyncDict",
- "encoded_path", "verify_directory"]
+__all__ = ["ThreadLocal", "WeakValuedRegistry", "SyncDict", "encoded_path",
+ "verify_directory"]
def function_named(fn, name):
@@ -72,7 +72,7 @@ def assert_raises(except_cls, callable_, *args, **kw):
try:
callable_(*args, **kw)
success = False
- except except_cls, e:
+ except except_cls:
success = True
# assert outside the block so it works for AssertionError too !

0 comments on commit 1863902

Please sign in to comment.
Something went wrong with that request. Please try again.