From 24d0e4e184800e76c6a792d263ca77a80f44add5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 25 Aug 2013 13:53:42 +0200 Subject: [PATCH] AttackProtector: Fix Pypy compatibility (again). --- AttackProtector/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AttackProtector/config.py b/AttackProtector/config.py index 5c317d9..36b1e18 100644 --- a/AttackProtector/config.py +++ b/AttackProtector/config.py @@ -83,7 +83,11 @@ class Punishment(registry.String): self.error() return self.setValue(s) -Punishment = internationalizeDocstring(Punishment) +try: + Punishment = internationalizeDocstring(Punishment) +except TypeError: + # Pypy + pass AttackProtector = conf.registerPlugin('AttackProtector') # This is where your configuration variables (if any) should go. For example: