Comment 10 for bug 1349634

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to jenkins-job-builder (master)

Reviewed: https://review.openstack.org/127370
Committed: https://git.openstack.org/cgit/openstack-infra/jenkins-job-builder/commit/?id=b7ff37ca5dfa1e44447387c636b8b0108404a0bf
Submitter: Jenkins
Branch: master

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

    Closes-Bug: #1349634
    Change-Id: Ib87fa497d80ba33470c049f875658a3878afb664