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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Nov 29 11:33:48 CET 2012


Revision: 19768
          http://gar.svn.sourceforge.net/gar/?rev=19768&view=rev
Author:   wahwah
Date:     2012-11-29 10:33:48 +0000 (Thu, 29 Nov 2012)
Log Message:
-----------
csw-upload-pkg: Check --os-release value

If an OS release is passed that doesn't match any of the expected values,
throw an error.

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	2012-11-29 09:48:00 UTC (rev 19767)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2012-11-29 10:33:48 UTC (rev 19768)
@@ -495,6 +495,11 @@
     else:
       print "Continuing anyway."
 
+  if os_release and os_release not in common_constants.OS_RELS:
+    raise DataError(
+        "OS release %r is not valid. Valid values: %r"
+        % (os_release, common_constants.OS_RELS))
+
   username, password = rest.GetUsernameAndPassword()
   uploader = Srv4Uploader(args,
                           options.rest_url,

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