Description of problem: If one asks for non-existent run python-nitrate tracebacks with KeyError. IMHO it should return more user friendly error / exception. Version-Release number of selected component (if applicable): python-nitrate-1.2-2 How reproducible: always Steps to Reproduce: 1. python -c 'import nitrate; print nitrate.TestRun(999999999)' Actual results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/nitrate/base.py", line 352, in __str__ return utils.ascii(unicode(self)) File "/usr/lib/python2.7/site-packages/nitrate/mutable.py", line 507, in __unicode__ return u"{0} - {1}".format(self.identifier, self.summary) File "/usr/lib/python2.7/site-packages/nitrate/base.py", line 64, in getter self._fetch() File "/usr/lib/python2.7/site-packages/nitrate/mutable.py", line 619, in _fetch self._build = Build(inject["build_id"]) KeyError: 'build_id' Expected results: NitrateError saying no data fetched OR non-existent run Additional info: In log ones sees that empty dictionary was retrieved, but one suspects error on server instead of PEBKAC in run number.
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
We discussed with Petr Splichal that better error could be provided generally for these objects - that means for TestPlan, TestRun and TestCase so it's unified.
Created attachment 1119448 [details] proposed patch Lukas, let me know if you find the patch reasonable or if you have any comments. Thank you.
*** Bug 906448 has been marked as a duplicate of this bug. ***
*** Bug 1011402 has been marked as a duplicate of this bug. ***
I like the attached patch.
Thanks for the patch, Iveta. Merged into master: https://github.com/psss/python-nitrate/commit/5d9c41f With a couple of adjustments and tests: https://github.com/psss/python-nitrate/commit/05b6e34
*** Bug 1181629 has been marked as a duplicate of this bug. ***
python-nitrate-1.3-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-687d19409b
python-nitrate-1.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-35a106d076
python-nitrate-1.3-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-2bb9364c32
python-nitrate-1.3-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7474e957a9
Latest packages for testing available in the copr repository: https://copr.fedorainfracloud.org/coprs/psss/python-nitrate/
python-nitrate-1.3-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-687d19409b
python-nitrate-1.3-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-2bb9364c32
python-nitrate-1.3-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7474e957a9
python-nitrate-1.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-35a106d076
python-nitrate-1.3-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
python-nitrate-1.3-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1121198 has been marked as a duplicate of this bug. ***
python-nitrate-1.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
python-nitrate-1.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.