From 651ac8c5386afcff5a6a81b152f0d03fa9de395d 2010-09-01 04:40:08 From: Fernando Perez Date: 2010-09-01 04:40:08 Subject: [PATCH] Fix small bug in UNC path context manager. --- diff --git a/IPython/utils/_process_win32.py b/IPython/utils/_process_win32.py index 5c59634..a1c7ccc 100644 --- a/IPython/utils/_process_win32.py +++ b/IPython/utils/_process_win32.py @@ -54,7 +54,11 @@ class AvoidUNCPath(object): if self.is_unc_path: # change to c drive (as cmd.exe cannot handle UNC addresses) os.chdir("C:") - return self.path + return self.path + else: + # We return None to signal that there was no change in the working + # directory + return None def __exit__(self, exc_type, exc_value, traceback): if self.is_unc_path: