Bug 1050952

Summary: [abrt] copr-cli: ConfigParser.py:618:get:NoOptionError: No option 'copr_url' in section: 'copr-cli'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: coprAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/8ebb3cbedc8e0ad810e060444834ff60d0d3c5e8
Whiteboard: abrt_hash:3448bea5d441b4e23d9b21c81d9beff3714b04d8
Fixed In Version: copr-1.26-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-06 03:46:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Miro Hrončok 2014-01-09 12:18:53 UTC
Description of problem:
$ copr-cli list

I didn't specify an URL, bur copr should preferably guess copr.fedoraproject.org or at least tell it to me in more decent way

Version-Release number of selected component:
copr-cli-1.21-1.fc20

Additional info:
reporter:       libreport-2.1.10
cmdline:        /usr/bin/python2 /usr/bin/copr-cli list
dso_list:       python-libs-2.7.5-9.fc20.x86_64
executable:     /usr/bin/copr-cli
kernel:         3.11.10-301.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
ConfigParser.py:618:get:NoOptionError: No option 'copr_url' in section: 'copr-cli'

Traceback (most recent call last):
  File "/usr/bin/copr-cli", line 9, in <module>
    load_entry_point('copr-cli==0.2.0', 'console_scripts', 'copr-cli')()
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 126, in main
    arg.func(arg)
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 44, in action_list
    subcommands.listcoprs(args.username)
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 88, in listcoprs
    copr_api_url = get_api_url()
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 74, in get_api_url
    copr_url = config.get('copr-cli', 'copr_url')
  File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
NoOptionError: No option 'copr_url' in section: 'copr-cli'

Local variables in innermost frame:
d: {'username': 'churchyard', '__name__': 'copr-cli', 'login': 'secretsecret', 'token': 'secretoken'}
vars: None
section: 'copr-cli'
vardict: {}
raw: False
sectiondict: OrderedDict([('__name__', 'copr-cli'), ('username', 'churchyard'), ('login', 'secretsecret'), ('token', ''secretoken')])
self: <ConfigParser.ConfigParser instance at 0x136e5a8>
option: 'copr_url'

Comment 1 Miro Hrončok 2014-01-09 12:19:15 UTC
Created attachment 847606 [details]
File: backtrace

Comment 2 Miro Hrončok 2014-01-09 12:19:33 UTC
Created attachment 847607 [details]
File: environ

Comment 3 Miro Hrončok 2014-01-09 12:44:09 UTC
man page clearly says:

COPR URL
       You can alternatively specify different URL of Copr service. Open file \~/.config/copr and put there:

           [copr-cli]
           copr_url = http://copr-fe.cloud.fedoraproject.org

       The value above is default. Define copr_url only if you use different instance.


If this has been changed to a mandatory option, it should be changed in man page as well and should have never been pushed to stable Fedora release. So I guess this is happening by mistake.

Comment 4 Miroslav Suchý 2014-01-09 13:33:07 UTC
Yes. This is error. copr_url should be optional.

Comment 5 Miroslav Suchý 2014-01-09 13:39:47 UTC
Fixed in upstream in commit fb5279c

Comment 6 Fedora Update System 2014-01-28 00:43:36 UTC
copr-1.26-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/copr-1.26-1.el6

Comment 7 Fedora Update System 2014-01-28 00:45:32 UTC
copr-1.26-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/copr-1.26-1.fc19

Comment 8 Fedora Update System 2014-01-28 00:52:33 UTC
copr-1.26-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/copr-1.26-1.fc20

Comment 9 Fedora Update System 2014-01-28 21:07:55 UTC
Package copr-1.26-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing copr-1.26-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-0388/copr-1.26-1.el6
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2014-02-06 03:46:54 UTC
copr-1.26-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 11 Fedora Update System 2014-02-06 03:58:09 UTC
copr-1.26-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.