equal
deleted
inserted
replaced
107 |
107 |
108 def _forbytes(inst): |
108 def _forbytes(inst): |
109 """Portably format an import error into a form suitable for |
109 """Portably format an import error into a form suitable for |
110 %-formatting into bytestrings.""" |
110 %-formatting into bytestrings.""" |
111 if pycompat.ispy3: |
111 if pycompat.ispy3: |
112 return encoding.tolocal(str(inst).encode('utf-8')) |
112 return encoding.unitolocal(str(inst)) |
113 return inst |
113 return inst |
114 |
114 |
115 def _reportimporterror(ui, err, failed, next): |
115 def _reportimporterror(ui, err, failed, next): |
116 # note: this ui.debug happens before --debug is processed, |
116 # note: this ui.debug happens before --debug is processed, |
117 # Use --config ui.debug=1 to see them. |
117 # Use --config ui.debug=1 to see them. |