Edgewall Software

Changes between Initial Version and Version 1 of Ticket #11509


Ignore:
Timestamp:
Mar 2, 2014, 1:44:58 PM (10 years ago)
Author:
Ryan J Ollos
Comment:

The proposed change that led to discovering this issue, as well as a proposed fix, can be found in log:rjollos.git:t11509. If the proposed change looks okay, unit tests for PermissionError should be added and the TracDev/Exceptions#CustomTracExceptions page needs to be updated.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11509

    • Property Owner set to Ryan J Ollos
    • Property Status newassigned
    • Property Milestone 0.12.61.0.2
  • Ticket #11509 – Description

    initial v1  
    1616TypeError: coercing to Unicode: need string or buffer, LazyProxy found
    1717}}}
    18 
    19 The following patch seems to fix the issue, but I am unsure that it is the correct solution.
    20 {{{#!diff
    21 diff --git a/trac/perm.py b/trac/perm.py
    22 index 4b514e4..f0f9475 100644
    23 --- a/trac/perm.py
    24 +++ b/trac/perm.py
    25 @@ -59,7 +59,7 @@ class PermissionError(StandardError):
    26                           'operation. You don\'t have the required '
    27                           'permissions.', perm=self.action)
    28          elif self.msg:
    29 -            return self.msg
    30 +            return unicode(self.msg)
    31          else:
    32              return _('Insufficient privileges to perform this operation.')
    33  
    34 }}}