[csw-devel] SF.net SVN: gar:[12130] csw/mgar/gar/v2/lib/python/package_stats.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Dec 30 03:49:29 CET 2010


Revision: 12130
          http://gar.svn.sourceforge.net/gar/?rev=12130&view=rev
Author:   wahwah
Date:     2010-12-30 02:49:29 +0000 (Thu, 30 Dec 2010)

Log Message:
-----------
checkpkg: Detect missing objects

When a data object is missing, act the same way as when the data are out of
date: try to reindex.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_stats.py

Modified: csw/mgar/gar/v2/lib/python/package_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats.py	2010-12-30 02:48:58 UTC (rev 12129)
+++ csw/mgar/gar/v2/lib/python/package_stats.py	2010-12-30 02:49:29 UTC (rev 12130)
@@ -100,7 +100,11 @@
     if not pkg_stats:
       return False
     if pkg_stats.stats_version != PACKAGE_STATS_VERSION:
+      pkg_stats.DeleteAllDependentObjects()
       pkg_stats.destroySelf()
+    elif pkg_stats.data_obj is None:
+      pkg_stats.DeleteAllDependentObjects()
+      pkg_stats.destroySelf()
     else:
       return True
     return False


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list