Changeset 3662

Show
Ignore:
Timestamp:
05/11/08 23:04:49 (4 months ago)
Author:
superafroman
Message:

Fixed error caused by state not changing.
Update docformat and added some docs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ticketvalidatorplugin/0.11/src/ticketvalidator/core.py

    r3656 r3662  
    3232        """Check if 'value' is empty. 
    3333         
    34         :param:value the value to check 
    35         :type:value object""" 
     34        :param value: the value to check 
     35        :type value: object""" 
    3636         
    37         if value == None: 
     37        if value is None: 
    3838            return True 
    3939         
     
    4848 
    4949    def validate_ticket(self, req, ticket): 
    50         """Validate a ticket after it's been populated from user input. 
    51          
    52         Must return a list of `(field, message)` tuples, one for each problem 
    53         detected. `field` can be `None` to indicate an overall problem with the 
    54         ticket. Therefore, a return value of `[]` means everything is OK.""" 
     50        """Make sure required fields for the next state have been  
     51        the ticket will be in have been entered.""" 
    5552 
    5653        state = self._get_state(req, ticket) 
    5754 
    58         self.log.info('old state = %s, new state = %s' %(ticket['status'], state)) 
     55        # state not changed, no need to re-check 
     56        if state is None: 
     57            return [] 
    5958 
    6059        required_fields = self.config.getlist('ticketvalidator',  
  • ticketvalidatorplugin/0.11/src/ticketvalidator/__init__.py

    r3656 r3662  
    1919# along with TicketValidator.  If not, see  
    2020# <http://www.gnu.org/licenses/>. 
     21 
     22__docformat__ = 'restructuredtext en'