[Neo-report] r1802 gregory - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 19 17:22:10 CET 2010


Author: gregory
Date: Fri Feb 19 17:22:09 2010
New Revision: 1802

Log:
Test empty history condition before.

This allow raise KeyError even for getSerial().

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Fri Feb 19 17:22:09 2010
@@ -905,14 +905,15 @@
 
         if not isinstance(self.local_var.history, tuple):
             raise NEOStorageError('history failed')
-        if object_only:
-            # Use by getSerial
-            return self.local_var.history
 
         if self.local_var.history[1] == []:
             # KeyError expected if no history was found
             # XXX: this may requires an error from the storages
             raise KeyError
+
+        if object_only:
+            # Use by getSerial
+            return self.local_var.history
 
         # Now that we have object informations, get txn informations
         history_list = []





More information about the Neo-report mailing list