File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,17 @@ def provide_source_code_local(recipe_dir):
103
103
out = None
104
104
err = None
105
105
106
+ def _print_out_err ():
107
+ try :
108
+ if out :
109
+ sys .stdout .write (out .read ())
110
+ if err :
111
+ sys .stderr .write (err .read ())
112
+ except Exception as e :
113
+ logger .error (
114
+ "Error printing out/err in getting conda build src!" , exc_info = e
115
+ )
116
+
106
117
try :
107
118
with wurlitzer .pipes () as (out , err ):
108
119
from conda_build .api import render
@@ -123,14 +134,7 @@ def provide_source_code_local(recipe_dir):
123
134
# provide source dir
124
135
yield provide (md )
125
136
except (SystemExit , Exception ) as e :
126
- if out :
127
- sys .stdout .write (out .getvalue ())
128
- if err :
129
- sys .stderr .write (err .getvalue ())
130
-
137
+ _print_out_err ()
131
138
raise RuntimeError ("conda build src exception: " + str (e ))
132
139
133
- if out :
134
- sys .stdout .write (out .getvalue ())
135
- if err :
136
- sys .stderr .write (err .getvalue ())
140
+ _print_out_err ()
You can’t perform that action at this time.
0 commit comments