Bug 891419 - ksvalidator produces no output when redirected
ksvalidator produces no output when redirected
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-01-02 16:37 EST by Gabe Conradi
Modified: 2013-01-02 16:43 EST (History)
2 users (show)

See Also:
Fixed In Version: pykickstart-1.99.23-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-02 16:43:18 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)
Diff for fix to bug (709 bytes, application/octet-stream)
2013-01-02 16:37 EST, Gabe Conradi
no flags Details

  None (edit)
Description Gabe Conradi 2013-01-02 16:37:29 EST
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:

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 16:43:18 EST
Thanks for the patch, pushed.

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