commit b7ff37ca5dfa1e44447387c636b8b0108404a0bf
Author: Khai Do <email address hidden>
Date: Thu Oct 9 15:08:18 2014 -0700
fix delete job command and add tests
change I126751e3 introduced recursive file definition feature however it broke
the ability to delete jobs. This changes fixes it and adds a few tests for it.
This was the error when trying to delete a job:
(py27)~/jenkins-job-builder$ jenkins-jobs --conf jenkins_jobs.ini delete myjob
INFO:root:Deleting jobs in [myjob]
Traceback (most recent call last):
File "/jenkins-job-builder/.tox/py27/bin/jenkins-jobs", line 10, in <module> sys.exit(main())
File "/jenkins-job-builder/jenkins_jobs/cmd.py", line 122, in main execute(options, config)
File "/jenkins-job-builder/jenkins_jobs/cmd.py", line 207, in execute builder.delete_job(job, options.path)
File "/jenkins-job-builder/jenkins_jobs/builder.py", line 611, in delete_job self.load_files(fn)
File "/jenkins-job-builder/jenkins_jobs/builder.py", line 576, in load_files
if os.path.isdir(path):
File "/jenkins-job-builder/.tox/py27/lib/python2.7/genericpath.py", line 41,
in isdir st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Reviewed: https:/ /review. openstack. org/127370 /git.openstack. org/cgit/ openstack- infra/jenkins- job-builder/ commit/ ?id=b7ff37ca5df a1e44447387c636 b8b0108404a0bf
Committed: https:/
Submitter: Jenkins
Branch: master
commit b7ff37ca5dfa1e4 4447387c636b8b0 108404a0bf
Author: Khai Do <email address hidden>
Date: Thu Oct 9 15:08:18 2014 -0700
fix delete job command and add tests
change I126751e3 introduced recursive file definition feature however it broke
the ability to delete jobs. This changes fixes it and adds a few tests for it.
This was the error when trying to delete a job:
(py27) ~/jenkins- job-builder$ jenkins-jobs --conf jenkins_jobs.ini delete myjob root:Deleting jobs in [myjob] job-builder/ .tox/py27/ bin/jenkins- jobs", line 10, in <module>
sys.exit( main()) job-builder/ jenkins_ jobs/cmd. py", line 122, in main
execute( options, config) job-builder/ jenkins_ jobs/cmd. py", line 207, in execute
builder. delete_ job(job, options.path) job-builder/ jenkins_ jobs/builder. py", line 611, in delete_job
self.load_ files(fn) job-builder/ jenkins_ jobs/builder. py", line 576, in load_files isdir(path) : job-builder/ .tox/py27/ lib/python2. 7/genericpath. py", line 41,
INFO:
Traceback (most recent call last):
File "/jenkins-
File "/jenkins-
File "/jenkins-
File "/jenkins-
File "/jenkins-
if os.path.
File "/jenkins-
in isdir st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Closes-Bug: #1349634 3470c049f875658 a3878afb664
Change-Id: Ib87fa497d80ba3