equal
deleted
inserted
replaced
111 def after(self): |
111 def after(self): |
112 self.ui.debug(b'cleaning up %s\n' % self.tmppath) |
112 self.ui.debug(b'cleaning up %s\n' % self.tmppath) |
113 shutil.rmtree(self.tmppath, ignore_errors=True) |
113 shutil.rmtree(self.tmppath, ignore_errors=True) |
114 |
114 |
115 def recode(self, s, encoding=None): |
115 def recode(self, s, encoding=None): |
116 if isinstance(s, pycompat.unicode): |
116 if isinstance(s, str): |
117 # XMLParser returns unicode objects for anything it can't |
117 # XMLParser returns unicode objects for anything it can't |
118 # encode into ASCII. We convert them back to str to get |
118 # encode into ASCII. We convert them back to str to get |
119 # recode's normal conversion behavior. |
119 # recode's normal conversion behavior. |
120 s = s.encode('latin-1') |
120 s = s.encode('latin-1') |
121 return super(darcs_source, self).recode(s, encoding) |
121 return super(darcs_source, self).recode(s, encoding) |