Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #I tried python-redmine in the my machine that is running software-factory at http://sftests.com.
- #Proj a100 has 27 issues. And the api returns the right output.
- >>> from redmine import Redmine
- >>> redmine = Redmine('http://sftests.com/redmine', username='admin', password='userpass')
- >>> proj = redmine.project.get('a100')
- >>> proj.name
- u'a100'
- >>> proj.issues
- <redmine.resultsets.ResourceSet object with Issue resources>
- >>> proj.issues[0]
- <redmine.resources.Issue #27 "oiuou">
- >>> proj.issues[1]
- <redmine.resources.Issue #26 "owiefosdfsd">
- >>> proj.issues.total_count
- 27
- #I tried with another proj a99 that has 3 issues.
- >>> proj2 = redmine.project.get('a99')
- >>> proj2.name
- u'a99'
- >>> proj2.issues.total_count
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/usr/lib/python2.7/site-packages/redmine/resultsets.py", line 70, in total_count
- raise ResultSetTotalCountError
- redmine.exceptions.ResultSetTotalCountError: Total count is unknown before evaluation
- #Don't know why the above error occured.
- >>> proj2.issues[0]
- <redmine.resources.Issue #30 "odjsdf">
- >>> proj2.issues.total_count
- 3
- --------------------------------------------------------------------
- Let me look into the curl request output for https://github.com/redhat-cip/pysflib/blob/master/pysflib/sfredmine.py#L120
Add Comment
Please, Sign In to add comment