[csw-devel] SF.net SVN: gar:[14130] csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Apr 11 13:44:03 CEST 2011
Revision: 14130
http://gar.svn.sourceforge.net/gar/?rev=14130&view=rev
Author: wahwah
Date: 2011-04-11 11:44:03 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
csw-upload-pkg: Sort files when inserting
Dictionaries return keys in an unspecified order, so let's sort them
explicitly to get nicer screen output.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2011-04-11 11:06:10 UTC (rev 14129)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2011-04-11 11:44:03 UTC (rev 14130)
@@ -149,7 +149,7 @@
if checks_successful:
if self.output_to_screen:
print "All checks successful. Proceeding."
- for arch, osrel in checkpkg_sets:
+ for arch, osrel in sorted(checkpkg_sets):
for filename, md5_sum in checkpkg_sets[(arch, osrel)]:
file_metadata = metadata_by_md5[md5_sum]
self._InsertIntoCatalog(filename, arch, osrel, file_metadata)
@@ -168,7 +168,7 @@
arch = file_metadata['arch']
catalogs = self._MatchSrv4ToCatalogs(
filename, DEFAULT_CATREL, arch, osrel, md5_sum)
- for unused_catrel, cat_arch, cat_osrel in catalogs:
+ for unused_catrel, cat_arch, cat_osrel in sorted(catalogs):
self._RemoveFromCatalog(filename, cat_arch, cat_osrel, file_metadata)
def _RemoveFromCatalog(self, filename, arch, osrel, file_metadata):
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