File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -138,26 +138,29 @@ def repo(self) -> Optional[str]:
138
138
return repo
139
139
140
140
def _run_command (self , cmd ):
141
+ on_travis = "TRAVIS_BRANCH" in os .environ
142
+ if on_travis :
143
+ self ._run_command_on_travis (cmd )
144
+ return
145
+ print ("$ %s" , cmd )
146
+ exit_code = os .system (cmd )
147
+ if exit_code != 0 :
148
+ raise RuntimeError ("Failed to build (exit_code=%s)" % exit_code )
149
+
150
+ def _run_command_on_travis (self , cmd ):
141
151
self ._logger .info (cmd )
142
152
143
153
stop = threading .Event ()
144
154
145
155
def f ():
146
156
nonlocal stop
147
157
counter = 0
148
- on_travis = "TRAVIS_BRANCH" in os . environ
158
+
149
159
while not stop .is_set ():
150
160
counter = counter + 1
161
+ print ("Still building... ({})" .format (counter ), flush = True )
162
+ stop .wait (10 )
151
163
152
- if on_travis :
153
- print ("Still building... ({})" .format (counter ), flush = True )
154
- stop .wait (10 )
155
- continue
156
-
157
- print ("." , end = "" , flush = True )
158
- stop .wait (1 )
159
- if not on_travis :
160
- print ()
161
164
threading .Thread (target = f ).start ()
162
165
try :
163
166
output = execute (cmd )
You can’t perform that action at this time.
0 commit comments