Bug 891419 - ksvalidator produces no output when redirected
Summary: ksvalidator produces no output when redirected
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pykickstart
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-02 21:37 UTC by Gabe Conradi
Modified: 2013-01-02 21:43 UTC (History)
2 users (show)

Fixed In Version: pykickstart-1.99.23-1
Clone Of:
Environment:
Last Closed: 2013-01-02 21:43:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Diff for fix to bug (709 bytes, application/octet-stream)
2013-01-02 21:37 UTC, Gabe Conradi
no flags Details

Description Gabe Conradi 2013-01-02 21:37:29 UTC
Created attachment 671714 [details]
Diff for fix to bug

Description of problem:
ksvalidator will not produce any output if redirected to a file or pipe, but will if invoked with no redirection


Version-Release number of selected component (if applicable):
Present in origin/master (4305de8), and pykickstart-1.74.10-1.el6.noarch


How reproducible:
every time validating a kickstart when output is redirected.


Steps to Reproduce:
1. ksvalidator /tmp/test.ks | less
  
Actual results:
no output

Expected results:
output

Additional info:
Interestingly, it doesn't happen if I invoke 'ksvalidator -h|less', but it does when executing 'ksvalidator|less' (even though the output in both cases is the same when run without the pipe).

Seems to be an issue with ksvalidator calling os._exit(exitval) instead of sys.exit(exitval), which will flush buffers and cleanup as appropriate. Attached is a diff that fixes the bug.

Comment 1 Chris Lumens 2013-01-02 21:43:18 UTC
Thanks for the patch, pushed.


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