utils/spacewalk-clone-by-date | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 1d9b7146214e663c77b4209fa1cf8df97d871ce0
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Jan 9 13:41:57 2013 -0500
889317 - username check needs to happen after channel args length check
diff --git a/utils/spacewalk-clone-by-date b/utils/spacewalk-clone-by-date
index 47eb95f..3db0532 100755
--- a/utils/spacewalk-clone-by-date
+++ b/utils/spacewalk-clone-by-date
@@ -172,9 +172,6 @@ def parse_args():
options = merge_config(options)
- if not options.username:
- raise UserError("Username not specified")
-
if options.channels == None or len(options.channels) == 0:
raise UserError("No channels specified. See --help for details.")
else:
@@ -183,6 +180,14 @@ def parse_args():
if existing.startswith('-') or
channel_group[existing].startswith('-'):
raise UserError("The -l / --channels option requires two
arguments")
+ if options.parents != None:
+ if (len(options.parents) != 2
+ or options.parents[0].startswith('-')
+ or options.parents[1].startswith('-')):
+ raise UserError("The -a / --parents option requires two
arguments")
+
+ if not options.username:
+ raise UserError("Username not specified")
if not options.validate:
if options.to_date:
Show replies by date