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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 19 09:46:45 CET 2010


Author: gregory
Date: Fri Feb 19 09:46:44 2010
New Revision: 1799

Log:
Fix history behaviour for an unknown OID.

KeyError must be raised if the history is empty, see
HistoryTests.checkSimpleHistory test case.

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 09:46:44 2010
@@ -909,6 +909,11 @@
             # 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
+
         # Now that we have object informations, get txn informations
         history_list = []
         for serial, size in self.local_var.history[1]:





More information about the Neo-report mailing list