File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 80
80
"No link prefix results in all links being relative. "
81
81
"No effect when combined with --http." ,
82
82
)
83
+ aa (
84
+ "--close-stdin" ,
85
+ action = "store_true" ,
86
+ help = "When set, stdin will be closed before importing, to account for "
87
+ "ill-behaved modules that block on stdin."
88
+ )
83
89
84
90
DEFAULT_HOST , DEFAULT_PORT = 'localhost' , 8080
85
91
@@ -280,9 +286,8 @@ def main(_args=None):
280
286
global args
281
287
args = _args or parser .parse_args ()
282
288
283
- # We close stdin because some modules, upon import, are not very polite
284
- # and block on stdin.
285
- sys .stdin .close ()
289
+ if args .close_stdin :
290
+ sys .stdin .close ()
286
291
287
292
if args .template_dir is not None :
288
293
if not path .isdir (args .template_dir ):
You can’t perform that action at this time.
0 commit comments