get_jobs() TypeError in py3.7.0 but not in py2.7.12
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Jenkins |
New
|
Undecided
|
Unassigned |
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.
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-
----> 1 s.get_jobs('All')
~/anaconda3/
985 else:
986 return self.get_
--> 987 folder_
988
989 def get_all_jobs(self, folder_depth=None, folder_
~/anaconda3/
1037 jobs_list.
1038 if 'jobs' in job and isinstance(
-> 1039 if folder_depth is None or lvl < folder_depth:
1040 children = job['jobs']
1041 # once folder_
TypeError: '<' not supported between instances of 'int' and 'str'
Nevermind! I see that using the named param works on py3
s.get_jobs( view_name= 'All')
I didn't remember that being a behavioral difference from py2 to py3...(?)