Reducing debug output
authorEd Page <eopage@byu.net>
Wed, 24 Feb 2010 03:46:09 +0000 (21:46 -0600)
committerEd Page <eopage@byu.net>
Wed, 24 Feb 2010 03:46:09 +0000 (21:46 -0600)
src/handle.py

index cfbcecc..0db35fe 100644 (file)
@@ -84,8 +84,9 @@ def create_handle_factory():
                        cache[key] = handle
                        isNewHandle = True
                connection._handles[handle.get_type(), handle.get_id()] = handle
                        cache[key] = handle
                        isNewHandle = True
                connection._handles[handle.get_type(), handle.get_id()] = handle
-               handleStatus = "Is New!" if isNewHandle else "From Cache"
-               _moduleLogger.debug("Created Handle: %r (%s)" % (handle, handleStatus))
+               if isNewHandle:
+                       handleStatus = "Is New!" if isNewHandle else "From Cache"
+                       _moduleLogger.debug("Created Handle: %r (%s)" % (handle, handleStatus))
                return handle
 
        return _create_handle
                return handle
 
        return _create_handle