Bug 1327597 - __str__(ProjectList) crashes
Summary: __str__(ProjectList) crashes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-copr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-15 13:04 UTC by Igor Gnatenko
Modified: 2016-05-21 05:19 UTC (History)
3 users (show)

Fixed In Version: python-copr-1.68-1.fc22 python-copr-1.68-1.fc23 python-copr-1.68-1.fc24 python-copr-1.68-1.el7 python-copr-1.68-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-16 22:25:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Igor Gnatenko 2016-04-15 13:04:51 UTC
Traceback (most recent call last):
  File "run.py", line 73, in <module>
    main()
  File "run.py", line 68, in main
    _build_in_copr(args.srpm, args.project_owner, args.project_name)
  File "run.py", line 18, in _build_in_copr
    print(proj)
  File "/usr/lib/python3.5/site-packages/copr/util.py", line 13, in __str__
    return self.__unicode__()
AttributeError: 'ProjectList' object has no attribute '__unicode__'

Comment 1 Jakub Kadlčík 2016-04-18 15:22:01 UTC
Reproducer:

COPR_URL = "http://copr-fe-dev.cloud.fedoraproject.org/"
from copr import create_client2_from_params
cl = create_client2_from_params(root_url=COPR_URL)
projects = cl.projects.get_list(limit=10)
print(projects)

Comment 2 Jakub Kadlčík 2016-04-19 11:07:54 UTC
I've added unicode representation for all descendants of CollectionResource, such as ProjectList, BuildList, etc. Please see the following output example.


# This was done long time ago
>>> print(project)
<Project #1: msuchy/copr>
 
# This is suggested solution for this issue
>>> print(projects)
<ProjectList: [<Project #1: msuchy/copr>, <Project #9: jfilak/abrt>, <Project #10: hhorak/mysql55-test1>]>


Modified in: 020ec8f


Do you and others agree with the output format?

Comment 3 Fedora Update System 2016-05-05 07:01:10 UTC
python-copr-1.68-1.fc22 copr-cli-1.50-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-83199bf70e

Comment 4 Fedora Update System 2016-05-05 07:01:43 UTC
python-copr-1.68-1.el7 copr-cli-1.50-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-9a4d5dfb13

Comment 5 Fedora Update System 2016-05-05 07:02:00 UTC
python-copr-1.68-1.fc24 copr-cli-1.50-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e2be6d1814

Comment 6 Fedora Update System 2016-05-05 07:02:17 UTC
python-copr-1.68-1.fc23 copr-cli-1.50-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-99f84a68dc

Comment 7 Fedora Update System 2016-05-05 07:02:32 UTC
python-copr-1.68-1.el6 copr-cli-1.50-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d7889ce228

Comment 8 Fedora Update System 2016-05-05 09:54:01 UTC
copr-cli-1.50-1.fc24, python-copr-1.68-1.fc24 has been pushed to the Fedora 24 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-e2be6d1814

Comment 9 Fedora Update System 2016-05-05 15:52:15 UTC
copr-cli-1.50-1.fc23, python-copr-1.68-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-99f84a68dc

Comment 10 Fedora Update System 2016-05-05 21:18:39 UTC
copr-cli-1.50-1.el6, python-copr-1.68-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-d7889ce228

Comment 11 Fedora Update System 2016-05-05 21:24:07 UTC
copr-cli-1.50-1.el7, python-copr-1.68-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-9a4d5dfb13

Comment 12 Fedora Update System 2016-05-06 09:22:53 UTC
copr-cli-1.50-1.fc22, python-copr-1.68-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-83199bf70e

Comment 13 Fedora Update System 2016-05-16 22:24:39 UTC
copr-cli-1.50-1.fc22, python-copr-1.68-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-05-16 22:27:50 UTC
copr-cli-1.50-1.fc23, python-copr-1.68-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-05-20 17:42:04 UTC
copr-cli-1.50-1.fc24, python-copr-1.68-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-05-20 20:19:09 UTC
copr-cli-1.50-1.el7, python-copr-1.68-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.

Comment 17 Fedora Update System 2016-05-21 05:18:52 UTC
copr-cli-1.50-1.el6, python-copr-1.68-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.


Note You need to log in before you can comment on or make changes to this bug.