Author: stsp Date: Fri Jan 22 12:04:31 2021 New Revision: 1885784 URL: http://svn.apache.org/viewvc?rev=1885784&view=rev Log: Fix byte vs. string confusion in mailer.py DiffGenerator class.
Fixes "AttributeError: 'str' object has no attribute 'decode'" which could be triggered by the mailer.py test suite. * tools/hook-scripts/mailer/mailer.py (DiffGenerator): Consumers of this class expect the base_path to be a byte string. Store the byte string instead of a local copy which has already been converted to a string object. Modified: subversion/trunk/tools/hook-scripts/mailer/mailer.py Modified: subversion/trunk/tools/hook-scripts/mailer/mailer.py URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/mailer/mailer.py?rev=1885784&r1=1885783&r2=1885784&view=diff ============================================================================== --- subversion/trunk/tools/hook-scripts/mailer/mailer.py (original) +++ subversion/trunk/tools/hook-scripts/mailer/mailer.py Fri Jan 22 12:04:31 2021 @@ -1021,7 +1021,7 @@ class DiffGenerator: # return a data item for this diff return _data( path=change.path, - base_path=base_path, + base_path=base_path_bytes, base_rev=change.base_rev, diff=diff, diff_url=diff_url,