equal
deleted
inserted
replaced
161 self.exception( |
161 self.exception( |
162 'an exception occurred while calling js_%s(%s): %s', |
162 'an exception occurred while calling js_%s(%s): %s', |
163 fname, args, exc) |
163 fname, args, exc) |
164 raise RemoteCallFailed(exc_message(exc, self._cw.encoding)) |
164 raise RemoteCallFailed(exc_message(exc, self._cw.encoding)) |
165 if result is None: |
165 if result is None: |
166 return '' |
166 return b'' |
167 # get unicode on @htmlize methods, encoded string on @jsonize methods |
167 # get unicode on @htmlize methods, encoded string on @jsonize methods |
168 elif isinstance(result, text_type): |
168 elif isinstance(result, text_type): |
169 return result.encode(self._cw.encoding) |
169 return result.encode(self._cw.encoding) |
170 return result |
170 return result |
171 |
171 |