From fe432984501841f5b0a7ef9479a1f86f6f7bf36d Mon Sep 17 00:00:00 2001 From: pjenvey Date: Fri, 18 Aug 2006 00:20:01 +0000 Subject: exception message cleanup --- paste/registry.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'paste/registry.py') diff --git a/paste/registry.py b/paste/registry.py index 1487475..a34dbde 100644 --- a/paste/registry.py +++ b/paste/registry.py @@ -176,8 +176,8 @@ class StackedObjectProxy(object): return object else: raise TypeError( - "No object (Name: %s) has been registered for this \ - thread" % self.__dict__['_name']) + 'No object (name: %s) has been registered for this ' + 'thread' % self.__dict__['_name']) def push_object(self, obj): """ @@ -221,14 +221,13 @@ class StackedObjectProxy(object): """ if not hasattr(self.local, 'objects'): - raise AssertionError("No object has been registered for this thread.") + raise AssertionError('No object has been registered for this thread') popped = self.local.objects.pop() if obj: if popped is not obj: raise AssertionError( - "The object popped (%s) is not the same as the object " - "expected (%s)" - % (popped, obj)) + 'The object popped (%s) is not the same as the object ' + 'expected (%s)' % (popped, obj)) class Registry(object): """Track objects and stacked object proxies for removal -- cgit v1.2.1