gvalkov / jenkins-autojobs

Automatically create Jenkins jobs from template jobs and branches in a SCM repository
http://jenkins-autojobs.rtfd.org
Other
49 stars 39 forks source link

Fixed `403 Client Error: Forbidden` during cleanup #45

Closed bartoszj closed 9 years ago

bartoszj commented 9 years ago

Hi, once again my pull request regarding 403. So I've fixed exception handling, HTTPError has response property with status_code. In my case I'm receiving status code 403 while fetching job configuration at line 179 managed_jobs = (job for job in jenkins.jobs if tag in job.config). I've added additional method which returns "managed" jobs and catches exceptions if needed. Last thing is performance optimizations:

I've executed unit tests using tox so nothing should be broken.

gvalkov commented 9 years ago

Hello again and apologies for my poor response times. On first reading your patch looks quite good. I'll look into merging it asap. Thanks.