Bug 1029727

Summary: [beaker-client][bkr] parse job xml fail, when the <task> node indent incorrect.
Product: [Fedora] Fedora Reporter: JianHong Yin <jiyin>
Component: python-beakerAssignee: Kyle VanderBeek <kylev>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: kylev, lmacken
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-13 03:02:37 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:
Attachments:
Description Flags
the job xml file can parse correct.
none
the job xml file(just with wrong indent) parse fail. none

Description JianHong Yin 2013-11-13 02:49:54 UTC
Created attachment 823238 [details]
the job xml file can parse correct.

Description of problem:
[bkr] parse job xml fail, when the <task> node indent incorrect.
bkr job-summit <xml file with wrong indent>

Version-Release number of selected component (if applicable):
# rpm -qf `which bkr`
beaker-client-0.15.1-1.fc18.noarch

How reproducible:
100%

Steps to Reproduce:
1. 
2.
3.

Actual results:
# bkr job-submit m2,1.job.xml.fail
Traceback (most recent call last):
  File "/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.15.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.7/site-packages/bkr/client/main.py", line 58, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_job_submit.py", line 178, in run
    doc = xml.dom.minidom.parseString("<dummy>%s</dummy>" % mystring)
  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1931, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 28, column 2


Expected results:
# bkr job-submit  m2,1.job.xml 
Submitted: ['J:542024']


Additional info:

Comment 1 JianHong Yin 2013-11-13 02:51:26 UTC
Created attachment 823239 [details]
the job xml file(just with wrong indent) parse fail.

Comment 2 JianHong Yin 2013-11-13 03:02:37 UTC
sorry for my mistake;