Ignore:
Timestamp:
21 Sep 2012, 08:19:35 (12 years ago)
Author:
uli
Message:

Rollback r9209. Looks like multiple merges from trunk confuse svn when merging back into trunk.

Location:
main/waeup.kofa/branches/uli-zc-async
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-zc-async

  • main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/objecthistory.py

    r9209 r9211  
    7878        self._annotations[self.history_key] = msgs
    7979        return
    80 
    81     def modifyMessages(self, old, new):
    82         """Replaces history messages.
    83 
    84         Substring 'old' will be replaced by 'new' in all
    85         messages.
    86         """
    87         old_msgs = self._getMessages()
    88         new_msgs = PersistentList()
    89         for msg in old_msgs:
    90             new_msg = msg.replace(old, new)
    91             new_msgs.append(new_msg)
    92         self._annotations[self.history_key] = new_msgs
    93         return
    94 
    95     def removeMessage(self, number):
    96         """Removes a single history message.
    97 
    98         """
    99         msgs = self._getMessages()
    100         if not isinstance(number, int):
    101             return False, 'Not a number'
    102         try:
    103             line = msgs[number]
    104         except IndexError:
    105             return False, 'Number out of range'
    106         msgs.pop(number)
    107         self._annotations[self.history_key] = msgs
    108         return True, line
Note: See TracChangeset for help on using the changeset viewer.