← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 1510393] [NEW] get_running_builds failed

 

Public bug reported:

when execute :
builds = server.get_running_builds()

I got an error:

server.get_running_builds()
  File "e:\project\python-jenkins-0.4.11\jenkins\__init__.py", line 1018, in get_running_builds
    job_name = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'

It means that sth wrong with this line:  m =
re.match(r'/job/([^/]+)/.*', urlparse(url).path)

Since  urlparse(url).path = '/host/jenkins/job/mavenproject/10/'  in my
project

the regexp pattern should be changed to  r'.*/job/([^/]+)/.*' to catch
the job name 'mavenproject'.

use  m = re.match(r'.*/job/(.+)/.*', urlparse(url).path) and I got the
correct result.

** Affects: python-jenkins
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1510393

Title:
  get_running_builds failed

Status in Python Jenkins:
  New

Bug description:
  when execute :
  builds = server.get_running_builds()

  I got an error:

  server.get_running_builds()
    File "e:\project\python-jenkins-0.4.11\jenkins\__init__.py", line 1018, in get_running_builds
      job_name = m.group(1)
  AttributeError: 'NoneType' object has no attribute 'group'

  It means that sth wrong with this line:  m =
  re.match(r'/job/([^/]+)/.*', urlparse(url).path)

  Since  urlparse(url).path = '/host/jenkins/job/mavenproject/10/'  in
  my project

  the regexp pattern should be changed to  r'.*/job/([^/]+)/.*' to catch
  the job name 'mavenproject'.

  use  m = re.match(r'.*/job/(.+)/.*', urlparse(url).path) and I got the
  correct result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1510393/+subscriptions