Show More
@@ -324,10 +324,9 b' def check_cpaste(code, should_fail=False):' | |||
|
324 | 324 | _ip.user_ns['code_ran'] = False |
|
325 | 325 | |
|
326 | 326 | src = StringIO() |
|
327 | try: | |
|
328 |
|
|
|
329 | except Exception: | |
|
330 | pass # ...but it's a read-only attribute in Python 3 | |
|
327 | if not hasattr(src, 'encoding'): | |
|
328 | # IPython expects stdin to have an encoding attribute | |
|
329 | src.encoding = None | |
|
331 | 330 | src.write('\n') |
|
332 | 331 | src.write(code) |
|
333 | 332 | src.write('\n--\n') |
General Comments 0
You need to be logged in to leave comments.
Login now