1 |
Author: zmedico |
2 |
Date: 2009-08-04 22:45:47 +0000 (Tue, 04 Aug 2009) |
3 |
New Revision: 13910 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/depgraph.py |
7 |
Log: |
8 |
Avoid UnicodeEncodeError with unicode package.mask comments. Thanks to |
9 |
Thanks to Scott Moreau (soreau) for reporting. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/_emerge/depgraph.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/_emerge/depgraph.py 2009-08-04 21:40:32 UTC (rev 13909) |
15 |
+++ main/trunk/pym/_emerge/depgraph.py 2009-08-04 22:45:47 UTC (rev 13910) |
16 |
@@ -5111,6 +5111,11 @@ |
17 |
pass |
18 |
|
19 |
print "- "+cpv+" (masked by: "+", ".join(mreasons)+")" |
20 |
+ |
21 |
+ if sys.hexversion < 0x3000000 and isinstance(comment, unicode): |
22 |
+ # avoid potential UnicodeEncodeError |
23 |
+ comment = comment.encode('utf_8', 'replace') |
24 |
+ |
25 |
if comment and comment not in shown_comments: |
26 |
print filename+":" |
27 |
print comment |