[Neo-report] r2018 vincent - /trunk/neo/client/handlers/storage.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 23 17:37:58 CEST 2010


Author: vincent
Date: Fri Apr 23 17:37:58 2010
New Revision: 2018

Log:
Improve error messages when conflict resolution is detected.

- dump() values
- include oid

Modified:
    trunk/neo/client/handlers/storage.py

Modified: trunk/neo/client/handlers/storage.py
==============================================================================
--- trunk/neo/client/handlers/storage.py [iso-8859-1] (original)
+++ trunk/neo/client/handlers/storage.py [iso-8859-1] Fri Apr 23 17:37:58 2010
@@ -77,15 +77,16 @@
             if pending_serial not in (None, serial) or \
                     resolved_serial not in (None, serial):
                 raise NEOStorageError, 'Multiple conflicts for a single ' \
-                    'object in a single store: %r, %r, %r' % (pending_serial,
-                        resolved_serial, serial)
+                    'object (%s) in a single store: %s, %s, %s' % (
+                        dump(oid), dump(pending_serial),
+                        dump(resolved_serial), dump(serial))
             # If this conflict is not already resolved, mark it for
             # resolution.
             if resolved_serial is None:
                 if object_stored_counter_dict[oid]:
                     raise NEOStorageError, 'Storage node(s) accepted ' \
-                        'object, but one (%s) reports a conflict.' % (
-                            dump(conn.getUUID()), )
+                        'object %s, but one (%s) reports a conflict.' % (
+                            dump(oid), dump(conn.getUUID()))
                 # Note: we might overwrite an entry, but above test protects
                 # against overwriting a different value.
                 conflict_serial_dict[oid] = serial





More information about the Neo-report mailing list