[csw-devel] SF.net SVN: gar:[12085] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Dec 27 11:50:40 CET 2010
Revision: 12085
http://gar.svn.sourceforge.net/gar/?rev=12085&view=rev
Author: wahwah
Date: 2010-12-27 10:50:40 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
checkpkg: Warning when finding srv4 by filename
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/pkgdb.py
csw/mgar/gar/v2/lib/python/pkgdb_test.py
Modified: csw/mgar/gar/v2/lib/python/pkgdb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb.py 2010-12-27 10:17:20 UTC (rev 12084)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py 2010-12-27 10:50:40 UTC (rev 12085)
@@ -24,6 +24,7 @@
import common_constants
import system_pkgmap
import catalog
+import checkpkg
from Cheetah.Template import Template
USAGE = """
@@ -142,6 +143,11 @@
"""Used to normalize identifiers (md5, filename).
Currently, strips paths off given package paths."""
+ if not checkpkg.IsMd5(some_id):
+ logging.warning(
+ "Given Id (%s) is not an md5 sum. Will attempt to retrieve "
+ "it from the datbase, but it might fail.",
+ repr(some_id))
return os.path.basename(some_id)
Modified: csw/mgar/gar/v2/lib/python/pkgdb_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb_test.py 2010-12-27 10:17:20 UTC (rev 12084)
+++ csw/mgar/gar/v2/lib/python/pkgdb_test.py 2010-12-27 10:50:40 UTC (rev 12085)
@@ -2,6 +2,7 @@
import unittest
import pkgdb
+import logging
class CatalogImporterUnitTest(unittest.TestCase):
@@ -19,4 +20,5 @@
if __name__ == '__main__':
+ logging.basicConfig(level=logging.CRITICAL)
unittest.main()
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