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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Feb 14 21:48:39 CET 2011


Revision: 13313
          http://gar.svn.sourceforge.net/gar/?rev=13313&view=rev
Author:   wahwah
Date:     2011-02-14 20:48:38 +0000 (Mon, 14 Feb 2011)

Log Message:
-----------
csw-upload-pkg: Add an error message

When a user tries to upload a package which was never seen by the database,
display a helpful error message.

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-02-14 20:31:43 UTC (rev 13312)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-02-14 20:48:38 UTC (rev 13313)
@@ -184,6 +184,12 @@
     file_in_allpkgs, file_metadata = self._GetSrv4FileMetadata(md5_sum)
     logging.debug("file_metadata %s", repr(file_metadata))
     if not file_metadata:
+      logging.error(
+          "File metadata was not found in the database.  "
+          "This happens when the package you're trying to upload was never "
+          "unpacked and imported into the database.  "
+          "To fix the problem, run checkpkg against your package and try "
+          "importing again.")
       raise DataError("file_metadata is empty: %s" % repr(file_metadata))
     osrel = file_metadata['osrel']
     arch = file_metadata['arch']


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