python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00567
[Bug 1811302] Re: get_jobs() TypeError in py3.7.0 but not in py2.7.12
You can close this issue, or convert to a question if it might be helpful to someone else...
Thanks everyone for your work on this project!
--
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/1811302
Title:
get_jobs() TypeError in py3.7.0 but not in py2.7.12
Status in Python Jenkins:
New
Bug description:
On both systems I seem to have an active good connection
i.e. I can execute:
server.jobs_count()
and both return 66
but when I try to do:
server.get_jobs('All')
I get a list of 66 dicts on py2, but on py3 I get (i had set s=server already):
In [20]: s.get_jobs('All')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-20-eba0071b4f25> in <module>()
----> 1 s.get_jobs('All')
~/anaconda3/lib/python3.7/site-packages/jenkins/__init__.py in get_jobs(self, folder_depth, folder_depth_per_request, view_name)
985 else:
986 return self.get_all_jobs(folder_depth=folder_depth,
--> 987 folder_depth_per_request=folder_depth_per_request)
988
989 def get_all_jobs(self, folder_depth=None, folder_depth_per_request=10):
~/anaconda3/lib/python3.7/site-packages/jenkins/__init__.py in get_all_jobs(self, folder_depth, folder_depth_per_request)
1037 jobs_list.append(job)
1038 if 'jobs' in job and isinstance(job['jobs'], list): # folder
-> 1039 if folder_depth is None or lvl < folder_depth:
1040 children = job['jobs']
1041 # once folder_depth_per_request is reached, Jenkins
TypeError: '<' not supported between instances of 'int' and 'str'
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1811302/+subscriptions
References