Bug 866930 - spacewalk-clone-by-date without --to_date option produces traceback
spacewalk-clone-by-date without --to_date option produces traceback
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
Depends On:
Blocks: 819027
  Show dependency treegraph
Reported: 2012-10-16 06:49 EDT by Jan Hutař
Modified: 2013-01-18 08:47 EST (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-utils-1.7.15-42-sat
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-18 08:47:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2012-10-16 06:49:40 EDT
Description of problem:
When you run spacewalk-clone-by-date without specifying starting date, it tracebacks with error which is not helpful to the user.

Version-Release number of selected component (if applicable):
(same issue on Sat541 and in current SWnightly)

How reproducible:

Steps to Reproduce:
1. # spacewalk-clone-by-date -u <user> -p <nimda> -s $( hostname ) -l <some_channel> <new_channel>

Actual results:
# spacewalk-clone-by-date -u <user> -p <nimda> -s $( hostname ) -l <some_channel> <new_channel>
Traceback (most recent call last):
  File "/usr/bin/spacewalk-clone-by-date", line 209, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-clone-by-date", line 198, in main
    args = parse_args();
  File "/usr/bin/spacewalk-clone-by-date", line 166, in parse_args
    options.to_date = parse_time(options.to_date)
  File "/usr/bin/spacewalk-clone-by-date", line 179, in parse_time
    if re.match('[0-9]{4}-[0-9]{2}-[0-9]{2}',time_str):
  File "/usr/lib64/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

Expected results:
Error saying I do not have specified "--to_date".
Comment 1 Michael Mráka 2012-12-05 09:19:33 EST
Fixed in spacewalk master by
commit 414b6bd09d271ec0364aa159af350ba487f9e939
    866930 - do not traceback when called without --to_date
Comment 4 Stephen Herr 2013-01-09 14:48:48 EST
and 4c21c742bb41d326284118fc0532fb330a24b04a

I was encountering an exception when not including --to_date that I have fixed. I also updated the documentation to make it more clear what happens if you don't include --to_date.
Comment 7 errata-xmlrpc 2013-01-18 08:47:07 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.