jobqueue: Move jobqueue out of internal
This commit is contained in:
parent
d9bd19404d
commit
03b57f002c
21 changed files with 28 additions and 19 deletions
|
|
@ -442,6 +442,17 @@ func parseError(data []byte, repos []repoConfig) Error {
|
|||
|
||||
return e
|
||||
}
|
||||
func ParseError(data []byte) Error {
|
||||
var e Error
|
||||
if err := json.Unmarshal(data, &e); err != nil {
|
||||
// dumping the error into the Reason can get noisy, but it's good for troubleshooting
|
||||
return Error{
|
||||
Kind: "InternalError",
|
||||
Reason: fmt.Sprintf("Failed to unmarshal dnf-json error output %q: %s", string(data), err.Error()),
|
||||
}
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
func run(dnfJsonCmd []string, req *Request) ([]byte, error) {
|
||||
if len(dnfJsonCmd) == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue