File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 14
14
import os
15
15
import pathlib
16
16
import pkgutil
17
- from prompt_toolkit .patch_stdout \
18
- import patch_stdout
19
17
import textwrap
20
18
21
19
from pyflyby ._fast_iter_modules \
@@ -70,12 +68,11 @@ def _remove_import_cache_dir(path: pathlib.Path):
70
68
try :
71
69
shutil .rmtree (str (path ))
72
70
except Exception as e :
73
- with patch_stdout (raw = True ):
74
- logger .error (
75
- f"Failed to remove cache directory at { path } - please "
76
- "consider removing this directory manually. Error:\n "
77
- f"{ textwrap .indent (str (e ), prefix = ' ' )} "
78
- )
71
+ logger .error (
72
+ f"Failed to remove cache directory at { path } - please "
73
+ "consider removing this directory manually. Error:\n "
74
+ f"{ textwrap .indent (str (e ), prefix = ' ' )} "
75
+ )
79
76
80
77
81
78
@memoize
@@ -613,8 +610,7 @@ def _cached_module_finder(
613
610
for path in cache_dir .iterdir ():
614
611
_remove_import_cache_dir (path )
615
612
616
- with patch_stdout (raw = True ):
617
- logger .info (f"Rebuilding cache for { _format_path (importer .path )} ..." )
613
+ logger .info (f"Rebuilding cache for { _format_path (importer .path )} ..." )
618
614
619
615
modules = _iter_file_finder_modules (importer , SUFFIXES )
620
616
with open (cache_file , 'w' ) as fp :
You can’t perform that action at this time.
0 commit comments