Bug 1044592 - a slash in the "copr build" command causes a JSON error
Summary: a slash in the "copr build" command causes a JSON error
Keywords:
Status: CLOSED DUPLICATE of bug 1049460
Alias: None
Product: Copr
Classification: Community
Component: cli
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 15:56 UTC by Ryan Lerch
Modified: 2014-01-08 15:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-08 15:32:21 UTC


Attachments (Terms of Use)

Description Ryan Lerch 2013-12-18 15:56:51 UTC
Description of problem:
a slash in the copr field for "copr build" command causes a JSON error

Version-Release number of selected component (if applicable):
1.15

How reproducible:
every time

Steps to Reproduce:
1. run
copr build ryanlerch/coprname http://url.com/source.src.rpm

Actual results:
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 125, in main
    arg.func(arg)
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 21, in action_build
    args.memory, args.timeout, not args.nowait)
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 217, in build
    output = json.loads(req.text)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Expected results:
Error message saying the copr could not be found. Or detect that the user has prepended their username at the front, and just build it. 

Additional info:

Comment 1 Miroslav Suchý 2014-01-08 15:32:21 UTC

*** This bug has been marked as a duplicate of bug 1049460 ***


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