diff --git a/django/utils/_threading_local.py b/django/utils/_threading_local.py index bf9a25753a..08dae53dca 100644 --- a/django/utils/_threading_local.py +++ b/django/utils/_threading_local.py @@ -145,8 +145,8 @@ class _localbase(object): object.__setattr__(self, '_local__args', (args, kw)) object.__setattr__(self, '_local__lock', RLock()) - if args or kw and (cls.__init__ is object.__init__): - raise TypeError("Initialization arguments are not supported") + if (args or kw) and (cls.__init__ is object.__init__): + raise TypeError("Initialization arguments are not supported: %r, %r, %r" % (args, kw, cls.__init__ is object.__init__)) # We need to create the thread dict in anticipation of # __init__ being called, to make sure we don't call it