File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def main():
9090 print (usage_s , file = sys .stderr )
9191 sys .exit (2 )
9292
93- recipe_file : TextIO = io . TextIOWrapper ( sys . stdin . buffer , encoding = 'utf-8' , errors = 'ignore' )
93+ recipe_file : TextIO = None
9494 readable : bool = False
9595 vpos : bool = False
9696 out : TextIO = io .TextIOWrapper (sys .stdout .buffer , encoding = 'utf-8' , errors = 'ignore' )
@@ -129,6 +129,8 @@ def main():
129129 print (usage_s , file = sys .stderr )
130130 sys .exit (1 )
131131
132+ if not recipe_file :
133+ recipe_file = io .TextIOWrapper (sys .stdin .buffer , encoding = 'utf-8' , errors = 'ignore' )
132134 path_in : str = args [0 ]
133135 # done parsing arguments
134136
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def main():
9494 print (usage_s , file = sys .stderr )
9595 sys .exit (2 )
9696
97- toc_file : TextIO = io . TextIOWrapper ( sys . stdin . buffer , encoding = 'utf-8' , errors = 'ignore' )
97+ toc_file : TextIO = None
9898 print_toc : bool = False
9999 readable : bool = False
100100 out : Optional [str ] = None
@@ -131,6 +131,8 @@ def main():
131131 print (usage_s , file = sys .stderr )
132132 sys .exit (1 )
133133
134+ if not toc_file :
135+ toc_file = io .TextIOWrapper (sys .stdin .buffer , encoding = 'utf-8' , errors = 'ignore' )
134136 path_in : str = args [0 ]
135137 # done parsing arguments
136138
You can’t perform that action at this time.
0 commit comments