Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r136 - trunk/repoguard/src/repoguard/handlers/console.py

repoguard
Discussion topic

Back to topic list

svn commit: r136 - trunk/repoguard/src/repoguard/handlers/console.py

Author schlauch
Full name Tobias Schlauch
Date 2012-09-23 05:11:14 PDT
Message Author: schlauch
Date: 2012-09-23 05:11:13-0700
New Revision: 136

Modified:
   trunk/repoguard/src/​repoguard/handlers/c​onsole.py

Log:
Fixes ISSUE #47:
The console handler should gracefully handle cases in which for instance only the ACII encoding is allowed (e.g., Apache +SVN which uses the C locale as default). The priority is to somehow send the message out instead of raising an error. Thus, we use the 'U+FFFD' character to mark non-decodable characters.

Modified: trunk/repoguard/src/​repoguard/handlers/c​onsole.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/src/repoguar​d/handlers/console.p​y?view=diff&path​rev=136&r1=135​&r2=136
====================​====================​====================​==================
--- trunk/repoguard/src/​repoguard/handlers/c​onsole.py (original)
+++ trunk/repoguard/src/​repoguard/handlers/c​onsole.py 2012-09-23 05:11:13-0700
@@ -39,8 +39,8 @@
 
     def _singularize(self, config, entry):
         self._OUT[entry.result].write(
- self._PATTERN % unicode(entry).encod​e(self._ENCODING))
+ self._PATTERN % unicode(entry).encod​e(self._ENCODING, "replace"))
 
     def _summarize(self, config, protocol):
         self._OUT[protocol.r​esult].write(
- self._PATTERN % unicode(protocol).en​code(self._ENCODING)​)
+ self._PATTERN % unicode(protocol).en​code(self._ENCODING,​ "replace"))

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r136 - trunk/repoguard/src/repoguard/handlers/console.py schlauch Tobias Schlauch 2012-09-23 05:11:14 PDT
Messages per page: