Bug 1030493 - copr-cli create does not work
Summary: copr-cli create does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: copr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 14:51 UTC by Manuel Faux
Modified: 2013-12-20 01:51 UTC (History)
1 user (show)

Fixed In Version: copr-1.15-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-20 01:41:50 UTC


Attachments (Terms of Use)
patch for subcommand.py (493 bytes, patch)
2013-11-14 14:52 UTC, Manuel Faux
no flags Details | Diff

Description Manuel Faux 2013-11-14 14:51:40 UTC
Description of problem:
When calling "copr-cli create" without the --chroot parameter it crashes with an TypeError

Version-Release number of selected component (if applicable):
copr-cli-1.12-1

How reproducible:
Call "copr-cli cleate test"

Steps to Reproduce:
1. Configure your copr API key in ~/.config/copr
2. Execute "copr-cli cleate test"

Actual results:
Program crashes with:
Traceback (most recent call last):
  File "/usr/bin/copr-cli", line 9, in <module>
    load_entry_point('copr-cli==0.1.0', 'console_scripts', 'copr-cli')()
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 111, in main
    arg.func(arg)
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 33, in action_create
    args.initial_pkgs)
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 146, in create
    for chroot in chroots:
TypeError: 'NoneType' object is not iterable

Expected results:
Copr should be created without a manually configured chroot, or the program should show an error message, that the --chroot parameter is obligatory.

Comment 1 Manuel Faux 2013-11-14 14:52:24 UTC
Created attachment 823993 [details]
patch for subcommand.py

Comment 2 Miroslav Suchý 2013-11-14 15:18:54 UTC
The command to reproduce is:
  copr-cli create test
/ it take me some time to decipher that typo :) /

In fact at least one chroot must be selected. I added there check to print errror if none chroots is selected:

copr-cli create hkljhklj
Error: At least one chroot must be selected

Commited in upstream as 4ef718d

Comment 3 Fedora Update System 2013-12-10 17:53:34 UTC
copr-1.15-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/copr-1.15-1.fc19

Comment 4 Fedora Update System 2013-12-10 17:55:04 UTC
copr-1.15-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/copr-1.15-1.fc20

Comment 5 Fedora Update System 2013-12-11 16:46:56 UTC
Package copr-1.15-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing copr-1.15-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23187/copr-1.15-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-12-20 01:41:50 UTC
copr-1.15-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-12-20 01:51:32 UTC
copr-1.15-1.fc20 has been pushed to the Fedora 20 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.