rpm-software-management/dnf-plugins-core — pull request #40 by ignatenkobrain (2014-08-27 12:29:50+00:00)
Title: copr: check for 'ok' in 'output' for json data (RhBug:1134378)

```
Traceback (most recent call last):
File "/usr/bin/dnf", line 36, in
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
errcode = main(args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
return _main(base, args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
cli.run()
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1072, in run
return self.command.run(self.base.extcmds)
File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 147, in run
while i < len(json_parse["repos"]):
KeyError: 'repos'
```

Now we introduce internal function to check 'output' field in json
output. If it is not 'ok', then raise exception with 'error' field in
json.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1134378