#216 getTaskInfo errors on bad task id when request opt is True
Closed: Fixed 5 years ago Opened 5 years ago by mikem.

The normal behavior is non-strict. That is, it returns None when there is no such task.

[mike@localhost koji]$ koji --noauth call getTaskInfo 20100101
None

However, when including the request, we get:

[mike@localhost koji]$ koji --noauth call getTaskInfo 20100101 True
GenericError: query returned no rows

layers of bugs

  1. While _fetchSingle method could raise exceptions, but we don't try to catch these exceptions when we calling _fetchSingle (_singleValue method calls it).
  2. because the prototype of the Task.taskRequest method likes follows, hence strict parameter cannot pass to _singleValue method even we pass it all return values of locals()
     def getRequest(self):
             id = self.id                                                                                                                                                                                        
             query = """SELECT request FROM task WHERE id = %(id)i"""                                                                                                                                            
             xml_request = _singleValue(query, locals())
             ... ...
    

@mikem changed the status to Closed

5 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.11

5 years ago

Login to comment on this ticket.

Metadata