Bug 1005045

Summary: process.py:Met "TypeError: unicode() argument 2 must be string, not None" error
Product: [Retired] oVirt Reporter: haiyang,dong <hadong>
Component: ovirt-nodeAssignee: Mike Burns <mburns>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acathrow, cshao, fdeutsch, gouyang, hadong, huiwa, jboggs, leiwang, mburns, mgoldboi, ovirt-bugs, ovirt-maint, ycui, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-3.0.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-28 11:57:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description haiyang,dong 2013-09-06 06:12:33 UTC
Description of problem:
when using "check_output" of process.py in bash script:
python <<EOP
from ovirt.node.utils import process
process.check_output("ls")
EOP 

sys.stdin.encoding return None, not "utf-8", then
t will throw an exception:
File "/usr/lib/python2.7/site-packages/ovirt/node/utils/process.py", line 77, in check_output
TypeError:unicode()  argument 2 must be string, not None error

Version-Release number of selected component (if applicable):
ovirt-node-iso-3.1.0-0.999.999.20130902154824gitbe189b3.497.fc18.iso

How reproducible:
100% 
 
Steps to Reproduce:

Actual result:
Met "TypeError: unicode() argument 2 must be string, not None" error when trying using 
"check_output" of process.py in bash script

Expect result:
using "check_output" of process.py in bash script should success

Additional info:

--