Show More
@@ -2202,14 +2202,12 b' class InteractiveShell(SingletonConfigurable):' | |||
|
2202 | 2202 | with AvoidUNCPath() as path: |
|
2203 | 2203 | if path is not None: |
|
2204 | 2204 | cmd = '"pushd %s &&"%s' % (path, cmd) |
|
2205 | cmd = py3compat.unicode_to_str(cmd) | |
|
2206 | 2205 | try: |
|
2207 | 2206 | ec = os.system(cmd) |
|
2208 | 2207 | except KeyboardInterrupt: |
|
2209 | 2208 | print('\n' + self.get_exception_only(), file=sys.stderr) |
|
2210 | 2209 | ec = -2 |
|
2211 | 2210 | else: |
|
2212 | cmd = py3compat.unicode_to_str(cmd) | |
|
2213 | 2211 | # For posix the result of the subprocess.call() below is an exit |
|
2214 | 2212 | # code, which by convention is zero for success, positive for |
|
2215 | 2213 | # program failure. Exit codes above 128 are reserved for signals, |
@@ -37,7 +37,7 b' class Macro(object):' | |||
|
37 | 37 | self.value = code + '\n' |
|
38 | 38 | |
|
39 | 39 | def __str__(self): |
|
40 |
return |
|
|
40 | return self.value | |
|
41 | 41 | |
|
42 | 42 | def __unicode__(self): |
|
43 | 43 | return self.value |
@@ -42,7 +42,7 b' def test_unicode_ipdir():' | |||
|
42 | 42 | |
|
43 | 43 | old_ipdir1 = os.environ.pop("IPYTHONDIR", None) |
|
44 | 44 | old_ipdir2 = os.environ.pop("IPYTHON_DIR", None) |
|
45 |
os.environ["IPYTHONDIR"] = |
|
|
45 | os.environ["IPYTHONDIR"] = ipdir | |
|
46 | 46 | try: |
|
47 | 47 | app = BaseIPythonApplication() |
|
48 | 48 | # The lines below are copied from Application.initialize() |
@@ -87,7 +87,7 b" def unquote_filename(name, win32=(sys.platform=='win32')):" | |||
|
87 | 87 | def compress_user(path): |
|
88 | 88 | """Reverse of :func:`os.path.expanduser` |
|
89 | 89 | """ |
|
90 | path = py3compat.unicode_to_str(path, sys.getfilesystemencoding()) | |
|
90 | path = str(path) | |
|
91 | 91 | home = os.path.expanduser('~') |
|
92 | 92 | if path.startswith(home): |
|
93 | 93 | path = "~" + path[len(home):] |
General Comments 0
You need to be logged in to leave comments.
Login now