Bug 1044592

Summary: a slash in the "copr build" command causes a JSON error
Product: [Community] Copr Reporter: Ryan Lerch <rlerch>
Component: cliAssignee: Miroslav Suchý <msuchy>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-08 15:32:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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 ***