Revision: 23662 http://sourceforge.net/p/gar/code/23662 Author: wahwah Date: 2014-05-19 22:21:33 +0000 (Mon, 19 May 2014) Log Message: ----------- pkgdb: Add the CatalogSpec class
It can be used to represent a catalog specification: catalog release, architecture, and OS release. Modified Paths: -------------- csw/mgar/gar/v2/lib/python/checkpkg_lib.py csw/mgar/gar/v2/lib/web/releases_web.py Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py =================================================================== --- csw/mgar/gar/v2/lib/python/checkpkg_lib.py 2014-05-19 22:21:11 UTC (rev 23661) +++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py 2014-05-19 22:21:33 UTC (rev 23662) @@ -144,6 +144,13 @@ return m.group("username") if m else None +class CatalogSpec(collections.namedtuple( + 'CatalogSpec', ['catrel', 'arch', 'osrel'])): + + def __unicode__(self): + return u'{%s, %s, %s}' % self + + class SqlobjectHelperMixin(object): def __init__(self): Modified: csw/mgar/gar/v2/lib/web/releases_web.py =================================================================== --- csw/mgar/gar/v2/lib/web/releases_web.py 2014-05-19 22:21:11 UTC (rev 23661) +++ csw/mgar/gar/v2/lib/web/releases_web.py 2014-05-19 22:21:33 UTC (rev 23662) @@ -242,7 +242,7 @@ stuck and I don't know why. """ # used for logging - catspec = (catrel_name, arch_name, osrel_name) + catspec = checkpkg_lib.CatalogSpec(catrel_name, arch_name, osrel_name) logging.info('PUT %s %s', catspec, md5_sum) if catrel_name not in CAN_UPLOAD_TO_CATALOGS: # Updates via web are allowed only for the unstable catalog. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.