yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject yetus git commit: YETUS-426 Parser error on specifying just -V option
Date Thu, 14 Jul 2016 14:13:24 GMT
Repository: yetus
Updated Branches:
  refs/heads/master 64e48f97f -> 131f3af9b


YETUS-426 Parser error on specifying just -V option

Signed-off-by: Allen Wittenauer <aw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/131f3af9
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/131f3af9
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/131f3af9

Branch: refs/heads/master
Commit: 131f3af9ba103b7b5a05209da939e72c69090866
Parents: 64e48f9
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Sun Jul 10 15:36:43 2016 +0530
Committer: Allen Wittenauer <aw@apache.org>
Committed: Thu Jul 14 07:12:56 2016 -0700

----------------------------------------------------------------------
 release-doc-maker/releasedocmaker.py | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/131f3af9/release-doc-maker/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/release-doc-maker/releasedocmaker.py b/release-doc-maker/releasedocmaker.py
index c4e526f..00c8d00 100755
--- a/release-doc-maker/releasedocmaker.py
+++ b/release-doc-maker/releasedocmaker.py
@@ -731,20 +731,21 @@ def parse_args():
     (options, _) = parser.parse_args()
 
     # Validate options
-    if options.versions is None:
-        parser.error("At least one version needs to be supplied")
-    if options.projects is None:
-        parser.error("At least one project needs to be supplied")
-    if options.base_url is not None:
-        if len(options.base_url) > 1:
-            parser.error("Only one base URL should be given")
-        else:
-            options.base_url = options.base_url[0]
-    if options.output_directory is not None:
-        if len(options.output_directory) > 1:
-            parser.error("Only one output directory should be given")
-        else:
-            options.output_directory = options.output_directory[0]
+    if not options.release_version:
+        if options.versions is None:
+            parser.error("At least one version needs to be supplied")
+        if options.projects is None:
+            parser.error("At least one project needs to be supplied")
+        if options.base_url is not None:
+            if len(options.base_url) > 1:
+                parser.error("Only one base URL should be given")
+            else:
+                options.base_url = options.base_url[0]
+        if options.output_directory is not None:
+            if len(options.output_directory) > 1:
+                parser.error("Only one output directory should be given")
+            else:
+                options.output_directory = options.output_directory[0]
 
     return options
 


Mime
View raw message