Bug 866930 - spacewalk-clone-by-date without --to_date option produces traceback
Summary: spacewalk-clone-by-date without --to_date option produces traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 819027
TreeView+ depends on / blocked
 
Reported: 2012-10-16 10:49 UTC by Jan Hutař
Modified: 2013-01-18 13:47 UTC (History)
1 user (show)

Fixed In Version: spacewalk-utils-1.7.15-42-sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-18 13:47:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0167 0 normal SHIPPED_LIVE Red Hat Network Satellite server bug fix and enhancement update 2013-01-18 18:45:25 UTC

Description Jan Hutař 2012-10-16 10:49:40 UTC
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):
spacewalk-utils-1.7.15-37.el6sat.noarch
(same issue on Sat541 and in current SWnightly)


How reproducible:
always


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 14:19:33 UTC
Fixed in spacewalk master by
commit 414b6bd09d271ec0364aa159af350ba487f9e939
    866930 - do not traceback when called without --to_date

Comment 4 Stephen Herr 2013-01-09 19:48:48 UTC
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 13:47:07 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-0167.html


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