Show More
@@ -21,9 +21,6 b' def check_cpaste(code, should_fail=False):' | |||||
21 | ip.user_ns['code_ran'] = False |
|
21 | ip.user_ns['code_ran'] = False | |
22 |
|
22 | |||
23 | src = StringIO() |
|
23 | src = StringIO() | |
24 | if not hasattr(src, 'encoding'): |
|
|||
25 | # IPython expects stdin to have an encoding attribute |
|
|||
26 | src.encoding = None |
|
|||
27 | src.write(code) |
|
24 | src.write(code) | |
28 | src.write('\n--\n') |
|
25 | src.write('\n--\n') | |
29 | src.seek(0) |
|
26 | src.seek(0) |
General Comments 0
You need to be logged in to leave comments.
Login now