Bug 1050952 - [abrt] copr-cli: ConfigParser.py:618:get:NoOptionError: No option 'copr_url' in section: 'copr-cli'
Summary: [abrt] copr-cli: ConfigParser.py:618:get:NoOptionError: No option 'copr_url' ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: copr
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:3448bea5d441b4e23d9b21c81d9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-09 12:18 UTC by Miro Hrončok
Modified: 2014-02-06 03:58 UTC (History)
1 user (show)

Fixed In Version: copr-1.26-1.fc20
Clone Of:
Environment:
Last Closed: 2014-02-06 03:46:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.26 KB, text/plain)
2014-01-09 12:19 UTC, Miro Hrončok
no flags Details
File: environ (3.18 KB, text/plain)
2014-01-09 12:19 UTC, Miro Hrončok
no flags Details

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.


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